Replace it by the local variable ret, as its value is used only in the __tmainCRTStartup() function. --- mingw-w64-crt/crt/crtexe.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c index 4134b948b7ae..3d36983b8a0d 100644 --- a/mingw-w64-crt/crt/crtexe.c +++ b/mingw-w64-crt/crt/crtexe.c @@ -51,7 +51,6 @@ extern void __main(void); static _TCHAR **argv; static _TCHAR **envp; -static int mainret=0; static int managedapp; static int has_cctor = 0; extern LPTOP_LEVEL_EXCEPTION_FILTER __mingw_oldexcpt_handler; @@ -237,14 +236,14 @@ __tmainCRTStartup (void) #else __initenv = envp; #endif - mainret = _tmain (argc, argv, envp); + ret = _tmain (argc, argv, envp); if (!managedapp) - exit (mainret); + exit (ret); if (has_cctor == 0) _cexit (); - return mainret; + return ret; } extern int __mingw_initltsdrot_force; -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public