summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-16 08:49:09 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-16 08:49:09 +0000
commit28d0fee9f6e2de329d88b38e7919e17c94e65444 (patch)
tree25e20fddd3228461f1c09e65d2eb3144644f4586
parentc8094ff154065f243292a09dce5d4c8d90f8309a (diff)
add casts (cosmetic; just be explicit)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/fiddle/function.c2
-rw-r--r--ext/fiddle/pointer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/fiddle/function.c b/ext/fiddle/function.c
index 8e280567db3..937b96c6470 100644
--- a/ext/fiddle/function.c
+++ b/ext/fiddle/function.c
@@ -214,7 +214,7 @@ function_call(int argc, VALUE argv[], VALUE self)
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);
diff --git a/ext/fiddle/pointer.c b/ext/fiddle/pointer.c
index 41c0adb8747..2fb21f832eb 100644
--- a/ext/fiddle/pointer.c
+++ b/ext/fiddle/pointer.c
@@ -440,7 +440,7 @@ rb_fiddle_ptr_inspect(VALUE self)
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);
}
/*