Commit b5aeb86a authored by Philipp Stephani's avatar Philipp Stephani

Avoid suppressing -Wcast-function-type warning.

GCC special-cases the type ‘void (*)(void)’ to not emit warnings when
cast, see
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.
parent a9766020
Pipeline #1564 failed with stage
in 63 minutes and 54 seconds
......@@ -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
......@@ -101,11 +101,6 @@ To add a new module function, proceed as follows:
# pragma GCC diagnostic ignored "-Wclobbered"
/* This module is lackadaisical about function casts. */
#if GNUC_PREREQ (8, 0, 0)
# pragma GCC diagnostic ignored "-Wcast-function-type"
/* We use different strategies for allocating the user-visible objects
(struct emacs_runtime, emacs_env, emacs_value), depending on
whether the user supplied the -module-assertions flag. If
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment