mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-06 16:57:03 +08:00
Silence unreachable code warnings in MSVC when FMT_USE_EXCEPTIONS are disabled. (#4515)
This commit is contained in:
parent
f91dc80f4c
commit
9588458917
@ -138,8 +138,12 @@ FMT_FUNC void report_error(const char* message) {
|
||||
// from MSVC.
|
||||
FMT_THROW(format_error(message));
|
||||
#else
|
||||
fputs(message, stderr);
|
||||
abort();
|
||||
// Silence unreachable code warnings in MSVC.
|
||||
volatile bool b = true;
|
||||
if (b) {
|
||||
fputs(message, stderr);
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user