From 79a92dfdb43fefd774ea8f51bd6b9a2b9d0ce137 Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Wed, 10 Jan 2018 12:29:05 -0800 Subject: [PATCH] logging: fix build error when using gcc with -Wmissing-braces Summary: Since std::array is actually a struct containing an array it technically requires double braces around its initializer. The language allows eliding these braces, and clang doesn't complain about only using a single brace, but gcc does when using `-Wmissing-braces`. Reviewed By: yfeldblum Differential Revision: D6695289 fbshipit-source-id: 913fcfbea4164a02d001bd2344e340c0b6ee62aa --- folly/experimental/logging/LogLevel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/experimental/logging/LogLevel.cpp b/folly/experimental/logging/LogLevel.cpp index fc09b006..e8fc5e6e 100644 --- a/folly/experimental/logging/LogLevel.cpp +++ b/folly/experimental/logging/LogLevel.cpp @@ -33,10 +33,10 @@ struct NumberedLevelInfo { StringPiece upperPrefix; }; -constexpr std::array numberedLogLevels = { +constexpr std::array numberedLogLevels = {{ NumberedLevelInfo{LogLevel::DBG, LogLevel::DBG0, "dbg", "DBG"}, NumberedLevelInfo{LogLevel::INFO, LogLevel::INFO0, "info", "INFO"}, -}; +}}; } // namespace LogLevel stringToLogLevel(StringPiece name) { -- 2.34.1