From 1bc84577fffe09781cccb3263eafb5e5557823a4 Mon Sep 17 00:00:00 2001 From: Fabian Maurer Date: Mon, 9 Jul 2018 18:03:41 +0200 Subject: [PATCH] msvcrt: Use cdecl calling convention for atexit callback. Signed-off-by: Fabian Maurer Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcrt/exit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c index 4109f052771..77743d5b01f 100644 --- a/dlls/msvcrt/exit.c +++ b/dlls/msvcrt/exit.c @@ -397,7 +397,7 @@ void CDECL MSVCRT_exit(int exitcode) /********************************************************************* * atexit (MSVCRT.@) */ -int CDECL MSVCRT_atexit(void (*func)(void)) +int CDECL MSVCRT_atexit(void (__cdecl *func)(void)) { TRACE("(%p)\n", func); return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1; @@ -408,7 +408,7 @@ int CDECL MSVCRT_atexit(void (*func)(void)) /********************************************************************* * _crt_atexit (UCRTBASE.@) */ -int CDECL MSVCRT__crt_atexit(void (*func)(void)) +int CDECL MSVCRT__crt_atexit(void (__cdecl *func)(void)) { TRACE("(%p)\n", func); return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1;