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 | 4678e9340a5073f8ff1b4658bf6d3f72774af156 (patch) | |
tree | 15d9b723b3017a67f64650f6344ee89d17f3c6fd /file.c | |
parent | eb24aaf576ab0dc4f690445ea6e44d3f8ee04090 (diff) | |
download | ruby-4678e9340a5073f8ff1b4658bf6d3f72774af156.tar.gz |
* file.c (rb_file_s_chmod): avoid warning where sizeof(int) !=
sizeof(void*).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1681,7 +1681,7 @@ rb_file_ctime(VALUE obj) static void chmod_internal(const char *path, void *mode) { - if (chmod(path, (int)mode) < 0) + if (chmod(path, *(int *)mode) < 0) rb_sys_fail(path); } @@ -1710,7 +1710,7 @@ rb_file_s_chmod(int argc, VALUE *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); } |