[PATCH] w32: Fix clang compiler error with function pointer
Jacob Bachmeyer
jcb62281 at gmail.com
Wed May 31 05:34:42 CEST 2023
Biswapriyo Nath via Gnupg-devel wrote:
> [...]
> - static BOOL (WINAPI * func)(DWORD);
> + typedef BOOL (WINAPI * allow_set_forground)(DWORD);
> + static allow_set_forground func;
> [...]
> - func = GetProcAddress (handle, "AllowSetForegroundWindow");
> + func = (allow_set_forground) GetProcAddress (handle, "AllowSetForegroundWindow");
> [...]
Is "allow_set_forground" intended or a typo for "allow_set_foreground"?
Also, this looks like a clang bug: both version of the code should
declare a function pointer of the same type.
-- Jacob
More information about the Gnupg-devel
mailing list