Skip to content

Commit 9a1f0fe

Browse files
committed
fixup! mingw: kill child processes in a gentler way
It is actually illegal to case between function and data pointers, and it is fascinating that GCC allows that, but MSVC complains about that when we let it be strict. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ab7ca8f commit 9a1f0fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compat/win32/exit-process.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ static int exit_process(HANDLE process, int exit_code)
130130
HINSTANCE kernel32 = GetModuleHandleA("kernel32");
131131
if (!kernel32)
132132
die("BUG: cannot find kernel32");
133-
exit_process_address = (LPTHREAD_START_ROUTINE)(void *)
133+
exit_process_address =
134+
(LPTHREAD_START_ROUTINE)(void (*)(void))
134135
GetProcAddress(kernel32, "ExitProcess");
135136
initialized = 1;
136137
}

0 commit comments

Comments
 (0)