ruby-changes:50315
From: shyouhei <ko1@a...>
Date: Fri, 16 Feb 2018 17:49:13 +0900 (JST)
Subject: [ruby-changes:50315] shyouhei:r62430 (trunk): add casts (cosmetic; just be explicit)
shyouhei 2018-02-16 17:49:09 +0900 (Fri, 16 Feb 2018) New Revision: 62430 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62430 Log: add casts (cosmetic; just be explicit) Modified files: trunk/ext/fiddle/function.c trunk/ext/fiddle/pointer.c Index: ext/fiddle/pointer.c =================================================================== --- ext/fiddle/pointer.c (revision 62429) +++ ext/fiddle/pointer.c (revision 62430) @@ -440,7 +440,7 @@ rb_fiddle_ptr_inspect(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/fiddle/pointer.c#L440 TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, data); return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>", - RB_OBJ_CLASSNAME(self), data, data->ptr, data->size, data->free); + RB_OBJ_CLASSNAME(self), (void *)data, data->ptr, data->size, (void *)data->free); } /* Index: ext/fiddle/function.c =================================================================== --- ext/fiddle/function.c (revision 62429) +++ ext/fiddle/function.c (revision 62430) @@ -214,7 +214,7 @@ function_call(int argc, VALUE argv[], VA https://github.com/ruby/ruby/blob/trunk/ext/fiddle/function.c#L214 args.values[i] = (void *)&generic_args[i]; } args.values[argc] = NULL; - args.fn = NUM2PTR(cfunc); + args.fn = (void(*)(void))NUM2PTR(cfunc); (void)rb_thread_call_without_gvl(nogvl_ffi_call, &args, 0, 0); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/