Skip to content

Commit 2cc6699

Browse files
committed
[UCRT] Silence warning about returning noreturn function
1 parent a21a206 commit 2cc6699

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

sdk/lib/ucrt/misc/invalid_parameter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ extern "C" __declspec(noreturn) void __cdecl _invalid_parameter_noinfo_noreturn(
276276
EXCEPTION_NONCONTINUABLE);
277277

278278
TerminateProcess(GetCurrentProcess(), STATUS_INVALID_CRUNTIME_PARAMETER);
279+
UNREACHABLE;
279280
}
280281

281282
#else // ^^^ (_M_IX86 || _M_X64) && !_UCRT_ENCLAVE_BUILD ^^^ // vvv Newer Architectures vvv //

sdk/lib/ucrt/startup/exit.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,21 +285,25 @@ extern "C" int __cdecl _is_c_termination_complete()
285285
extern "C" void __cdecl exit(int const return_code)
286286
{
287287
common_exit(return_code, _crt_exit_full_cleanup, _crt_exit_terminate_process);
288+
UNREACHABLE;
288289
}
289290

290291
extern "C" void __cdecl _exit(int const return_code)
291292
{
292293
common_exit(return_code, _crt_exit_no_cleanup, _crt_exit_terminate_process);
294+
UNREACHABLE;
293295
}
294296

295297
extern "C" void __cdecl _Exit(int const return_code)
296298
{
297299
common_exit(return_code, _crt_exit_no_cleanup, _crt_exit_terminate_process);
300+
UNREACHABLE;
298301
}
299302

300303
extern "C" void __cdecl quick_exit(int const return_code)
301304
{
302305
common_exit(return_code, _crt_exit_quick_cleanup, _crt_exit_terminate_process);
306+
UNREACHABLE;
303307
}
304308

305309
extern "C" void __cdecl _cexit()

0 commit comments

Comments
 (0)