summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamkhai B <namkhai.n3@protonmail.com>2021-05-22 21:32:23 -0500
committerMax Kellermann <max@musicpd.org>2021-05-25 18:19:19 +0200
commitdbe12a6b9005df084d4fde776e00805cb0b14492 (patch)
tree3a32c5a84c266ac505da2ef1fafca946563e3a8c
parentd3a680cc87ebeea8c54f99a74c521048fdf8e8a9 (diff)
util/RuntimeError: Disable format-security for gcc
Fixes building under GCC 11
-rw-r--r--src/util/RuntimeError.hxx4
1 files 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 <stdio.h>
-#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