summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-07-27 23:29:02 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-07-28 14:11:55 +0000
commit8e0b73568c5fe3df3b7b553e3b26357515c81893 (patch)
tree2e6184a2cabb242bc7b159f65cd81a029e58268f
parent7f67277f1606e9d734b96fc6ab5c0d809c805a9f (diff)
downloadqbs-8e0b73568c5fe3df3b7b553e3b26357515c81893.tar.gz
protobuf: suppress warnings in addressbook_cpp example
Change-Id: I34de8d7c14b3e7556d53af0274366b9fb720c6d7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--examples/protobuf/addressbook_cpp/addressbook_cpp.qbs1
-rw-r--r--examples/protobuf/addressbook_cpp/main.cpp10
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 <ctime>
#include <fstream>
-#include <google/protobuf/util/time_util.h>
#include <iostream>
#include <string>
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+# include <google/protobuf/util/time_util.h>
+# pragma GCC diagnostic pop
+#else
+# include <google/protobuf/util/time_util.h>
+#endif // __GNUC__
+
#include "addressbook.pb.h"
using google::protobuf::util::TimeUtil;