From dbe12a6b9005df084d4fde776e00805cb0b14492 Mon Sep 17 00:00:00 2001 From: Namkhai B Date: Sat, 22 May 2021 21:32:23 -0500 Subject: [PATCH] util/RuntimeError: Disable format-security for gcc Fixes building under GCC 11 --- src/util/RuntimeError.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/RuntimeError.hxx b/src/util/RuntimeError.hxx index 962bad67b..74cb8a5de 100644 --- a/src/util/RuntimeError.hxx +++ b/src/util/RuntimeError.hxx @@ -35,7 +35,7 @@ #include -#ifdef __clang__ +#if defined(__clang__) || defined(__GNUC__) #pragma GCC diagnostic push // TODO: fix this warning properly #pragma GCC diagnostic ignored "-Wformat-security" @@ -59,7 +59,7 @@ FormatInvalidArgument(const char *fmt, Args&&... args) noexcept return std::invalid_argument(buffer); } -#ifdef __clang__ +#if defined(__clang__) || defined(__GNUC__) #pragma GCC diagnostic pop #endif