From 9a8826254496085445c59249243c52c185271ce8 Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Fri, 6 Dec 2019 16:03:47 -0800 Subject: [PATCH] fixing suppression of gtest warnings for gcc --- tests/algorithm_tests.cpp | 2 ++ tests/assertion_tests.cpp | 2 ++ tests/at_tests.cpp | 2 ++ tests/bounds_tests.cpp | 2 ++ tests/byte_tests.cpp | 2 ++ tests/multi_span_tests.cpp | 2 ++ tests/notnull_tests.cpp | 2 ++ tests/owner_tests.cpp | 2 ++ tests/span_tests.cpp | 2 ++ tests/strict_notnull_tests.cpp | 2 ++ tests/strided_span_tests.cpp | 2 ++ tests/string_span_tests.cpp | 2 ++ tests/utils_tests.cpp | 2 ++ 13 files changed, 26 insertions(+) diff --git a/tests/algorithm_tests.cpp b/tests/algorithm_tests.cpp index 7ba81b5..eb6641c 100644 --- a/tests/algorithm_tests.cpp +++ b/tests/algorithm_tests.cpp @@ -24,6 +24,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/assertion_tests.cpp b/tests/assertion_tests.cpp index c548d13..e445ceb 100644 --- a/tests/assertion_tests.cpp +++ b/tests/assertion_tests.cpp @@ -24,6 +24,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/at_tests.cpp b/tests/at_tests.cpp index 76ce444..6069e78 100644 --- a/tests/at_tests.cpp +++ b/tests/at_tests.cpp @@ -24,6 +24,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/bounds_tests.cpp b/tests/bounds_tests.cpp index f76dbac..d08c018 100644 --- a/tests/bounds_tests.cpp +++ b/tests/bounds_tests.cpp @@ -27,6 +27,8 @@ //disable warnings from gtest #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/byte_tests.cpp b/tests/byte_tests.cpp index c5403a4..36e10b0 100644 --- a/tests/byte_tests.cpp +++ b/tests/byte_tests.cpp @@ -24,6 +24,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/multi_span_tests.cpp b/tests/multi_span_tests.cpp index 8f5a1ef..5005eaa 100644 --- a/tests/multi_span_tests.cpp +++ b/tests/multi_span_tests.cpp @@ -28,6 +28,8 @@ //disable warnings from gtest #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/notnull_tests.cpp b/tests/notnull_tests.cpp index 3982bdd..cccd77e 100644 --- a/tests/notnull_tests.cpp +++ b/tests/notnull_tests.cpp @@ -27,6 +27,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/owner_tests.cpp b/tests/owner_tests.cpp index 8dafbde..2427803 100644 --- a/tests/owner_tests.cpp +++ b/tests/owner_tests.cpp @@ -25,6 +25,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index cb21e5c..b2687ce 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -25,6 +25,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/strict_notnull_tests.cpp b/tests/strict_notnull_tests.cpp index 08f9a3d..649007c 100644 --- a/tests/strict_notnull_tests.cpp +++ b/tests/strict_notnull_tests.cpp @@ -27,6 +27,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/strided_span_tests.cpp b/tests/strided_span_tests.cpp index 56ac88a..bc6d899 100644 --- a/tests/strided_span_tests.cpp +++ b/tests/strided_span_tests.cpp @@ -28,6 +28,8 @@ //disable warnings from gtest #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/string_span_tests.cpp b/tests/string_span_tests.cpp index d111d51..9fd2d1b 100644 --- a/tests/string_span_tests.cpp +++ b/tests/string_span_tests.cpp @@ -25,6 +25,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default" diff --git a/tests/utils_tests.cpp b/tests/utils_tests.cpp index add1fac..31eedb6 100644 --- a/tests/utils_tests.cpp +++ b/tests/utils_tests.cpp @@ -25,6 +25,8 @@ //disable warnings from gtest #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wundef" +#endif +#if __clang__ #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wused-but-marked-unused" #pragma GCC diagnostic ignored "-Wcovered-switch-default"