mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 11:23:29 +01:00
Add -Wmissing-variable-declarations to common warnings
This commit is contained in:
parent
7752229105
commit
d2cb934d28
@ -64,6 +64,7 @@ function(add_warnings_to_targets targets)
|
||||
"-Wmissing-braces"
|
||||
"-Wmissing-declarations"
|
||||
"-Wmissing-noreturn"
|
||||
"-Wmissing-variable-declarations"
|
||||
"-Wnull-dereference"
|
||||
"-Wold-style-cast"
|
||||
"-Woverloaded-virtual"
|
||||
|
@ -14,7 +14,7 @@
|
||||
namespace Catch {
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
|
||||
LeakDetector leakDetector;
|
||||
static LeakDetector leakDetector;
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ struct foo {
|
||||
#pragma clang diagnostic ignored "-Wglobal-constructors"
|
||||
#endif
|
||||
// Construct foo, but `foo::print` should not be run
|
||||
foo f;
|
||||
static foo f;
|
||||
|
||||
|
||||
#if defined(__clang__)
|
||||
|
Loading…
Reference in New Issue
Block a user