mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
eb24aaf576
commit
4678e9340a
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Jan 14 03:38:54 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* file.c (rb_file_s_chmod): avoid warning where sizeof(int) !=
|
||||
sizeof(void*).
|
||||
|
||||
Fri Jan 13 19:26:15 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* lib/rdoc/diagram.rb:
|
||||
|
|
4
file.c
4
file.c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue