From 6d44b037731fe497a98739bfd237e430f90974aa Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Sun, 27 Oct 2019 21:27:04 -0400 Subject: Eliminate most warnings on Linux --- rapidjsonwrapper.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'rapidjsonwrapper.h') diff --git a/rapidjsonwrapper.h b/rapidjsonwrapper.h index cf3dd829..1ff02e7e 100644 --- a/rapidjsonwrapper.h +++ b/rapidjsonwrapper.h @@ -2,6 +2,12 @@ #include #include +#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 -- cgit v1.3.1