summaryrefslogtreecommitdiff
path: root/rapidjsonwrapper.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2019-10-27 21:27:04 -0400
committerRusty Wagner <rusty.wagner@gmail.com>2019-10-27 22:55:50 -0400
commit6d44b037731fe497a98739bfd237e430f90974aa (patch)
treef9ef42f61ccbab8c15bcc072fea07249de7a6465 /rapidjsonwrapper.h
parenta49e1b7d4e3d1bab73337b6d9412350f39f5ce15 (diff)
Eliminate most warnings on Linux
Diffstat (limited to 'rapidjsonwrapper.h')
-rw-r--r--rapidjsonwrapper.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/rapidjsonwrapper.h b/rapidjsonwrapper.h
index cf3dd829..1ff02e7e 100644
--- a/rapidjsonwrapper.h
+++ b/rapidjsonwrapper.h
@@ -2,6 +2,12 @@
#include <exception>
#include <stdexcept>
+#if defined(__GNUC__) && __GNUC__ >= 8
+// Disable warnings from rapidjson performance optimizations
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
+#endif
+
struct GenericException;
struct ParseException;
@@ -30,4 +36,6 @@ struct ParseException: public std::runtime_error, rapidjson::ParseResult
#include "rapidjson/rapidjson.h"
#include "rapidjson/document.h"
-
+#if defined(__GNUC__) && __GNUC__ >= 8
+#pragma GCC diagnostic pop
+#endif