Skip to content

Commit 00245bb

Browse files
authored
Merge pull request #1402 from lplewa/windows_atexit
fix incompatible function pointer on windows
2 parents e1b1812 + 09dc91d commit 00245bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libumf_windows.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ void libumfInit(void) {
3333

3434
INIT_ONCE init_once_flag = INIT_ONCE_STATIC_INIT;
3535

36+
static void umfTearDownWrapper(void) { (void)umfTearDown(); }
37+
3638
BOOL CALLBACK initOnceCb(PINIT_ONCE InitOnce, PVOID Parameter,
3739
PVOID *lpContext) {
3840
(void)InitOnce; // unused
3941
(void)Parameter; // unused
4042
(void)lpContext; // unused
4143

4244
umf_result_t ret = umfInit();
43-
atexit(umfTearDown);
45+
atexit(umfTearDownWrapper);
4446
return (ret == UMF_RESULT_SUCCESS) ? TRUE : FALSE;
4547
}
4648

0 commit comments

Comments
 (0)