From b5aeb86a7ef4c5cbfbbd95e72568b4b5e48e9bae Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sun, 5 May 2019 01:56:15 +0200 Subject: Avoid suppressing -Wcast-function-type warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC special-cases the type ‘void (*)(void)’ to not emit warnings when cast, see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type. Make use of this to remove a warning suppression. * src/dynlib.h: Use void (*)(void) as generic function pointer type. * src/emacs-module.c: Remove warning suppression. --- src/dynlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dynlib.h') diff --git a/src/dynlib.h b/src/dynlib.h index 2688712a13e..43a0e045f5b 100644 --- a/src/dynlib.h +++ b/src/dynlib.h @@ -29,7 +29,7 @@ const char *dynlib_error (void); ATTRIBUTE_MAY_ALIAS void *dynlib_sym (dynlib_handle_ptr h, const char *sym); -typedef struct dynlib_function_ptr_nonce *(ATTRIBUTE_MAY_ALIAS *dynlib_function_ptr) (void); +typedef void (ATTRIBUTE_MAY_ALIAS *dynlib_function_ptr) (void); dynlib_function_ptr dynlib_func (dynlib_handle_ptr h, const char *sym); /* Sets *FILE to the file name from which PTR was loaded, and *SYM to -- cgit v1.2.3