diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-15 18:40:30 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-15 18:40:30 +0100 |
commit | c03dde703fc58651bf4773d78f6d46f8d79cc9e5 (patch) | |
tree | f9ecb2ceca7ac7ce3ae5b1ab4da414e836e47e67 | |
parent | If source_location is available, use it for safe numeric conversion exception... (diff) | |
download | netfs-c03dde703fc58651bf4773d78f6d46f8d79cc9e5.tar.bz2 netfs-c03dde703fc58651bf4773d78f6d46f8d79cc9e5.tar.xz netfs-c03dde703fc58651bf4773d78f6d46f8d79cc9e5.zip |
Turn off specific format-nonliteral warnings
-rw-r--r-- | netfs/fuse/netfs.cpp | 3 | ||||
-rw-r--r-- | netfs/unittests/mockMount.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
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; } |