From c03dde703fc58651bf4773d78f6d46f8d79cc9e5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 15 Apr 2022 18:40:30 +0100 Subject: Turn off specific format-nonliteral warnings --- netfs/fuse/netfs.cpp | 3 +++ netfs/unittests/mockMount.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/netfs/fuse/netfs.cpp b/netfs/fuse/netfs.cpp index 92242d4..7c5ea1a 100644 --- a/netfs/fuse/netfs.cpp +++ b/netfs/fuse/netfs.cpp @@ -38,8 +38,11 @@ public: void vlogf(int priority, const char * fmt, va_list args) const noexcept override { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" // NOLINTNEXTLINE(clang-diagnostic-format-nonliteral) vsyslog(priority, fmt, args); +#pragma GCC diagnostic push } }; diff --git a/netfs/unittests/mockMount.cpp b/netfs/unittests/mockMount.cpp index 9195c1b..38c9857 100644 --- a/netfs/unittests/mockMount.cpp +++ b/netfs/unittests/mockMount.cpp @@ -57,8 +57,11 @@ char * FuseMountPoint::vstrdupf(const char * fmt, va_list args) { char * out {}; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" // NOLINTNEXTLINE(clang-diagnostic-format-nonliteral) BOOST_REQUIRE_GE(vasprintf(&out, fmt, args), 0); +#pragma GCC diagnostic push BOOST_REQUIRE(out); return out; } -- cgit v1.2.3