From: Stefan Metzmacher Date: Tue, 15 Feb 2022 14:09:08 +0000 (+0100) Subject: replace: add explicit function pointer casting from dlsym() to avoid warnings X-Git-Tag: tevent-0.12.0~351 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbde99a03053ac719394e7370fbc9836cdc03d29;p=thirdparty%2Fsamba.git replace: add explicit function pointer casting from dlsym() to avoid warnings This avoids a lot of warnings on AIX. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Mar 23 13:27:45 UTC 2022 on sn-devel-184 --- diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 5344d816d58..a8910e2b5e4 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -998,7 +998,7 @@ static inline bool __rep_cwrap_enabled_fn(struct __rep_cwrap_enabled_state *stat state->retval = false; state->cached = true; - __wrapper_enabled_fn = dlsym(RTLD_DEFAULT, state->fnname); + __wrapper_enabled_fn = (bool (*)(void))dlsym(RTLD_DEFAULT, state->fnname); if (__wrapper_enabled_fn == NULL) { return state->retval; }