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