summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-05-19 14:57:15 +0200
committerMax Kellermann <max@musicpd.org>2021-05-19 14:57:20 +0200
commit28e7be248f7aef8ae9bef5db737f016106514fca (patch)
treefd055c29c35c179b9119ea988a8f7558545c68df /src
parentc3f9b38c974c5dc8e8621df680769e20ee361a24 (diff)
util/RuntimeError: disable -Wformat-security as a kludge
Diffstat (limited to 'src')
-rw-r--r--src/util/RuntimeError.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/RuntimeError.hxx b/src/util/RuntimeError.hxx
index 3d523013b..962bad67b 100644
--- a/src/util/RuntimeError.hxx
+++ b/src/util/RuntimeError.hxx
@@ -35,6 +35,12 @@
#include <stdio.h>
+#ifdef __clang__
+#pragma GCC diagnostic push
+// TODO: fix this warning properly
+#pragma GCC diagnostic ignored "-Wformat-security"
+#endif
+
template<typename... Args>
static inline std::runtime_error
FormatRuntimeError(const char *fmt, Args&&... args) noexcept
@@ -53,4 +59,8 @@ FormatInvalidArgument(const char *fmt, Args&&... args) noexcept
return std::invalid_argument(buffer);
}
+#ifdef __clang__
+#pragma GCC diagnostic pop
+#endif
+
#endif