Suppress unused variable warning for template test cases

The variable initialization has test registration as a side-effect,
but as far as GCC is concerned, the variable itself is unused.
Because the macro substitution always happens at global scope, we
cannot use cast to `void` as is usually done.
This commit is contained in:
Martin Hořeňovský committed 2020-02-26 16:07:39 +01:00
1 parent e601a5dc4f
commit 8d1e7ca896
2 files changed
+19 -1

No files matched your search

+3
View File
@@ -53,6 +53,9 @@
// for older versions of GCC.
# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
_Pragma( "GCC diagnostic ignored \"-Wparentheses\"" )
# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \
_Pragma( "GCC diagnostic ignored \"-Wunused-variable\"" )
#endif
#if defined(__clang__)