From 115fec062ccf7c6d72c8d5f64b7a5d84c9fb2dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 7 Feb 2020 14:14:05 +0900 Subject: more on NULL versus functions. Function pointers are not void*. See also ce4ea956d24eab5089a143bba38126f2b11b55b6 8427fca49bd85205f5a8766292dd893f003c0e48 --- dln.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dln.c') diff --git a/dln.c b/dln.c index 78c4c45a1f..2251547c54 100644 --- a/dln.c +++ b/dln.c @@ -1254,7 +1254,8 @@ static bool dln_incompatible_library_p(void *handle) { void *ex = dlsym(handle, EXTERNAL_PREFIX"ruby_xmalloc"); - return ex && ex != ruby_xmalloc; + void *const fp = (void *)ruby_xmalloc; + return ex && ex != fp; } COMPILER_WARNING_POP #endif -- cgit v1.2.1