summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-10-08 15:41:28 +0900
committerNobuyoshi Nakada <[email protected]>2024-10-08 23:29:49 +0900
commit9a90cd228466ec088d6f0da8d1aa065f03daa7c8 (patch)
treeb4fc458cdfbdad102551c421e7469e560e2b9030 /dln.c
parentd8b64eac55cf6c4b228b0969cd3abb0a6274de16 (diff)
Cast via `uintptr_t` function pointer between object pointer
- ISO C forbids conversion of function pointer to object pointer type - ISO C forbids conversion of object pointer to function pointer type
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dln.c b/dln.c
index db6ea5aa0f..043815148b 100644
--- a/dln.c
+++ b/dln.c
@@ -437,7 +437,7 @@ dln_sym(void *handle, const char *symbol)
#endif
}
-static void *
+static uintptr_t
dln_sym_func(void *handle, const char *symbol)
{
void *func = dln_sym(handle, symbol);
@@ -453,7 +453,7 @@ dln_sym_func(void *handle, const char *symbol)
#endif
dln_loaderror("%s - %s", error, symbol);
}
- return func;
+ return (uintptr_t)func;
}
#define dln_sym_callable(rettype, argtype, handle, symbol) \