diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index af9480f8..aaa3eaef 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -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 }