fix: incompatible pointer type 'FARPROC'

error: assignment to 'BOOL (*)(DWORD)' {aka 'int (*)(long unsigned int)'} from incompatible pointer type 'FARPROC' {aka 'long long int (*)()'} [-Wincompatible-pointer-types]
This commit is contained in:
saturneric 2024-07-29 01:07:00 +02:00
parent 26ff163bd6
commit 96d5817d77

View File

@ -243,7 +243,7 @@ my_spawn (char **argv, struct spawn_fd_item_s *fd_list, unsigned int flags)
handle = LoadLibrary ("user32.dll"); handle = LoadLibrary ("user32.dll");
if (handle) if (handle)
{ {
func = GetProcAddress (handle, "AllowSetForegroundWindow"); func = (BOOL (*)(DWORD)) GetProcAddress (handle, "AllowSetForegroundWindow");
if (!func) if (!func)
FreeLibrary (handle); FreeLibrary (handle);
} }