From 8e0b73568c5fe3df3b7b553e3b26357515c81893 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Mon, 27 Jul 2020 23:29:02 +0200 Subject: protobuf: suppress warnings in addressbook_cpp example Change-Id: I34de8d7c14b3e7556d53af0274366b9fb720c6d7 Reviewed-by: Oswald Buddenhagen Reviewed-by: Christian Kandeler --- examples/protobuf/addressbook_cpp/addressbook_cpp.qbs | 1 - examples/protobuf/addressbook_cpp/main.cpp | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs b/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs index 5d03d08e2..f01ca47f2 100644 --- a/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs +++ b/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs @@ -7,7 +7,6 @@ CppApplication { Depends { name: "cpp" } cpp.cxxLanguageVersion: "c++11" cpp.minimumMacosVersion: "10.8" - cpp.warningLevel: "none" Depends { name: "protobuf.cpp"; required: false } diff --git a/examples/protobuf/addressbook_cpp/main.cpp b/examples/protobuf/addressbook_cpp/main.cpp index 8d2ca9763..31baba3d1 100644 --- a/examples/protobuf/addressbook_cpp/main.cpp +++ b/examples/protobuf/addressbook_cpp/main.cpp @@ -30,10 +30,18 @@ #include #include -#include #include #include +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# include +# pragma GCC diagnostic pop +#else +# include +#endif // __GNUC__ + #include "addressbook.pb.h" using google::protobuf::util::TimeUtil; -- cgit v1.2.3