From 26db32469f381f75e11af25ddc2d1a8e83eeba45 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 30 Mar 2018 19:17:39 +0200 Subject: [PATCH] Fix a gcc-8 warning -Wcast-function-type Casting to the generic function type "void (*)(void)" prevents the warning. Reviewed-by: Ben Kaduk Reviewed-by: Kurt Roeckx (Merged from https://github.com/openssl/openssl/pull/5816) --- test/shlibloadtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/shlibloadtest.c b/test/shlibloadtest.c index a8cf8e7fde..aad90e6533 100644 --- a/test/shlibloadtest.c +++ b/test/shlibloadtest.c @@ -23,7 +23,7 @@ typedef SSL_CTX * (*SSL_CTX_new_t)(const SSL_METHOD *meth); typedef void (*SSL_CTX_free_t)(SSL_CTX *); typedef unsigned long (*ERR_get_error_t)(void); typedef unsigned long (*OpenSSL_version_num_t)(void); -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); typedef enum test_types_en { @@ -191,7 +191,7 @@ static int test_lib(void) { DSO *hndl; /* use known symbol from crypto module */ - if (!TEST_ptr(hndl = myDSO_dsobyaddr((void (*)())ERR_get_error, 0))) + if (!TEST_ptr(hndl = myDSO_dsobyaddr((void (*)(void))ERR_get_error, 0))) goto end; myDSO_free(hndl); } -- 2.25.1