From: Carlo Arenas Date: Thu, 23 Sep 2021 21:00:40 GMT Subject: Re: [PATCH cb/pedantic-build-for-developers] lazyload.h: fix warnings about mismatching function pointer types Message-ID: In-Reply-To: <4381472f-a9db-b8a7-a395-81c3935309ae@kdbg.org> On Wed, Sep 22, 2021 at 12:56 PM Johannes Sixt wrote: > diff --git a/compat/win32/lazyload.h b/compat/win32/lazyload.h > index d2056cdadf..dc35cf080b 100644 > --- a/compat/win32/lazyload.h > +++ b/compat/win32/lazyload.h > @@ -26,7 +26,8 @@ struct proc_addr { > #define DECLARE_PROC_ADDR(dll, rettype, function, ...) \ > static struct proc_addr proc_addr_##function = \ > { #dll, #function, NULL, 0 }; \ > - static rettype (WINAPI *function)(__VA_ARGS__) > + typedef rettype (WINAPI *proc_type_##function)(__VA_ARGS__); \ > + static proc_type_##function function; dropping the trailing ";" here will also make this macro easier to use IMHO; feel free to drop all the hunks moving declarations around from my patch when you do if included in a reroll or let me know if I can help otherwise. Carlo