Skip to content

Commit 07d4872

Browse files
authored
fix clang warnings
fix clang warning warning: no previous extern declaration for non-static variable 'X' [-Wmissing-variable-declarations]
1 parent 0a6857e commit 07d4872

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

UnitTest++/TestMacros.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
} \
2626
namespace Suite ## Name
2727

28-
#define UNITTEST_IMPL_TEST(Name, List) \
28+
#define UNITTEST_IMPL_TEST(Name, List) \
2929
class Test ## Name : public UnitTest::Test \
3030
{ \
3131
public: \
3232
Test ## Name() : Test(#Name, UnitTestSuite::GetSuiteName(), __FILE__, __LINE__) {} \
3333
private: \
3434
virtual void RunImpl() const; \
35-
} test ## Name ## Instance; \
35+
} static test ## Name ## Instance; \
3636
\
37-
UnitTest::ListAdder adder ## Name (List, &test ## Name ## Instance); \
37+
static UnitTest::ListAdder adder ## Name (List, &test ## Name ## Instance); \
3838
\
3939
void Test ## Name::RunImpl() const
4040

@@ -62,9 +62,9 @@
6262
Test ## Fixture ## Name() : Test(#Name, UnitTestSuite::GetSuiteName(), __FILE__, __LINE__) {} \
6363
private: \
6464
virtual void RunImpl() const; \
65-
} static test ## Fixture ## Name ## Instance; \
65+
} static test ## Fixture ## Name ## Instance; \
6666
\
67-
static UnitTest::ListAdder adder ## Fixture ## Name (List, &test ## Fixture ## Name ## Instance); \
67+
static UnitTest::ListAdder adder ## Fixture ## Name (List, &test ## Fixture ## Name ## Instance); \
6868
\
6969
void Test ## Fixture ## Name::RunImpl() const \
7070
{ \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy