aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-06-10 13:22:55 +1000
committerNeil <nyamatongwe@gmail.com>2017-06-10 13:22:55 +1000
commitac23936dc6c4caf6462214f8117639a6198bb52a (patch)
tree6bab8385a2439742bcdbe54ddf39859da2f0eca6
parent75e9090ffcd0364ccf3d39c98c4628b119667c7e (diff)
downloadscintilla-mirror-ac23936dc6c4caf6462214f8117639a6198bb52a.tar.gz
Backport: Avoid warnings when compiling unit tests with recent GCC.
Backport of changeset 6305:f2f32d58bcd8.
-rw-r--r--test/unit/unitTest.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/unitTest.cxx b/test/unit/unitTest.cxx
index a6feed204..eb554abc2 100644
--- a/test/unit/unitTest.cxx
+++ b/test/unit/unitTest.cxx
@@ -38,6 +38,14 @@
#include "Platform.h"
+#if defined(__GNUC__)
+// Want to avoid misleading indentation warnings in catch.hpp but the pragma
+// may not be available so protect by turning off pragma warnings
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wmisleading-indentation"
+#endif
+
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"