diff --git a/compat/win32/lazyload.h b/compat/win32/lazyload.h index 121ee24ed2..2b3637135f 100644 --- a/compat/win32/lazyload.h +++ b/compat/win32/lazyload.h @@ -15,10 +15,12 @@ * source, target); */ +typedef void (*FARVOIDPROC)(void); + struct proc_addr { const char *const dll; const char *const function; - FARPROC pfunction; + FARVOIDPROC pfunction; unsigned initialized : 1; }; @@ -38,7 +40,7 @@ struct proc_addr { #define INIT_PROC_ADDR(function) \ (function = (proc_type_##function)get_proc_addr(&proc_addr_##function)) -static inline FARPROC get_proc_addr(struct proc_addr *proc) +static inline FARVOIDPROC get_proc_addr(struct proc_addr *proc) { /* only do this once */ if (!proc->initialized) { @@ -47,7 +49,8 @@ static inline FARPROC get_proc_addr(struct proc_addr *proc) hnd = LoadLibraryExA(proc->dll, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); if (hnd) - proc->pfunction = GetProcAddress(hnd, proc->function); + proc->pfunction = (FARVOIDPROC)GetProcAddress(hnd, + proc->function); } /* set ENOSYS if DLL or function was not found */ if (!proc->pfunction) diff --git a/config.mak.dev b/config.mak.dev index c080ac0231..cdf043c52b 100644 --- a/config.mak.dev +++ b/config.mak.dev @@ -12,7 +12,6 @@ DEVELOPER_CFLAGS += -pedantic DEVELOPER_CFLAGS += -Wpedantic ifneq ($(filter gcc5,$(COMPILER_FEATURES)),) DEVELOPER_CFLAGS += -Wno-pedantic-ms-format -DEVELOPER_CFLAGS += -Wno-incompatible-pointer-types endif endif DEVELOPER_CFLAGS += -Wdeclaration-after-statement