crt: Add noreturn attribute with _amsg_exit

This fixes the following compiler warning

ucrtbase_compat.c:105:34: warning: function `_amsg_exit' could be
declared with attribute `noreturn' [-Wmissing-noreturn]
void __cdecl _amsg_exit(int ret) {
                                 ^

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
This commit is contained in:
Biswapriyo Nath 2023-07-15 11:04:46 +05:30 committed by LIU Hao
parent 0f4a2abd69
commit a255040fe8

View File

@ -35,7 +35,7 @@
// to get rid of the _CRTIMP in headers).
int __cdecl __getmainargs(int * _Argc, char *** _Argv, char ***_Env, int _DoWildCard, _startupinfo *_StartInfo);
int __cdecl __wgetmainargs(int * _Argc, wchar_t *** _Argv, wchar_t ***_Env, int _DoWildCard, _startupinfo *_StartInfo);
void __cdecl _amsg_exit(int ret);
void __cdecl __MINGW_ATTRIB_NORETURN _amsg_exit(int ret);
unsigned int __cdecl _get_output_format(void);
int __cdecl __ms_fwprintf(FILE *, const wchar_t *, ...);
@ -102,7 +102,7 @@ int __cdecl at_quick_exit(void (__cdecl *func)(void))
int __cdecl (*__MINGW_IMP_SYMBOL(at_quick_exit))(void (__cdecl *)(void)) = at_quick_exit;
void __cdecl _amsg_exit(int ret) {
void __cdecl __MINGW_ATTRIB_NORETURN _amsg_exit(int ret) {
fprintf(stderr, "runtime error %d\n", ret);
_exit(255);
}