mirror of
https://github.com/fmtlib/fmt.git
synced 2025-09-28 23:50: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.
|
// from MSVC.
|
||||||
FMT_THROW(format_error(message));
|
FMT_THROW(format_error(message));
|
||||||
#else
|
#else
|
||||||
|
// Silence unreachable code warnings in MSVC.
|
||||||
|
volatile bool b = true;
|
||||||
|
if (b) {
|
||||||
fputs(message, stderr);
|
fputs(message, stderr);
|
||||||
abort();
|
abort();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user