From 2529ec05206801489cce2799d638db903c68f272 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Tue, 25 Oct 2016 22:47:21 +0200 Subject: [PATCH] fix(logger): Add pragmas to silence GCC error --- include/components/logger.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/components/logger.hpp b/include/components/logger.hpp index 5714fe35..92978d82 100644 --- a/include/components/logger.hpp +++ b/include/components/logger.hpp @@ -153,10 +153,15 @@ class logger { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-security" #endif dprintf(m_fd, (prefix + format + suffix + "\n").c_str(), convert(values)...); #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif }