diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-13 18:44:34 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-13 18:44:34 +0000 |
commit | 8190c93409a02d0bf2b3e6d518d26b2a89fcecfe (patch) | |
tree | 504a789d860b37e524269ecbc808aa9a9085e151 /file.c | |
parent | cdefa0421d17f9f0c894531c67c10c98a867ed4c (diff) |
* file.c (rb_file_s_chmod): avoid warning where sizeof(int) !=
sizeof(void*).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1695,7 +1695,7 @@ chmod_internal(path, mode) const char *path; void *mode; { - if (chmod(path, (int)mode) < 0) + if (chmod(path, *(int *)mode) < 0) rb_sys_fail(path); } @@ -1726,7 +1726,7 @@ rb_file_s_chmod(argc, argv) rb_scan_args(argc, argv, "1*", &vmode, &rest); mode = NUM2INT(vmode); - n = apply2files(chmod_internal, rest, (void *)(long)mode); + n = apply2files(chmod_internal, rest, &mode); return LONG2FIX(n); } |