Casting to the generic function type "void (*)(void)"
prevents the warning.
Backport of #5816
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6027)
# define DSO_FREE "DSO_free"
typedef void DSO;
-typedef DSO * (*DSO_dsobyaddr_t)(void (*addr)(), int flags);
+typedef DSO * (*DSO_dsobyaddr_t)(void (*addr)(void), int flags);
typedef int (*DSO_free_t)(DSO *dso);
static DSO_dsobyaddr_t DSO_dsobyaddr;
{
DSO *hndl;
/* use known symbol from crypto module */
- if ((hndl = DSO_dsobyaddr((void (*)())ERR_get_error, 0)) != NULL) {
+ if ((hndl = DSO_dsobyaddr((void (*)(void))ERR_get_error, 0)) != NULL) {
DSO_free(hndl);
} else {
printf("Unable to obtain DSO reference from crypto symbol\n");