From 0f85a4683a137fa76ca7573ffbf4f7b118040b80 Mon Sep 17 00:00:00 2001 From: Ryan Sherlock Date: Fri, 19 Mar 2021 16:56:52 -0700 Subject: [PATCH] add default cases (#2186) Adding default case for switch statements where the compilation flag -Wswitch-default is present on the command line when spdlog is included in external projects. Signed-off-by: Ryan Sherlock --- include/fmt/format.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/fmt/format.h b/include/fmt/format.h index 7b52f782..0215a0a7 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2874,6 +2874,8 @@ FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end, case '^': align = align::center; break; + default: + break; } if (align != align::none) { if (p != begin) { @@ -2963,6 +2965,8 @@ FMT_CONSTEXPR_DECL FMT_INLINE const Char* parse_format_specs( handler.on_space(); ++begin; break; + default: + break; } if (begin == end) return begin;