summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib/testString.cxx
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2019-01-11 21:58:56 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-15 19:09:46 (GMT)
commitb056bc34258267c4ae59c72e3777d0a0f0b5a1b1 (patch)
treeaa1632cdb773244aa402c0cf7ccd4f6e53a28536 /Tests/CMakeLib/testString.cxx
parentda566d4de885130e182edc80f13691f5ca24bb61 (diff)
downloadCMake-b056bc34258267c4ae59c72e3777d0a0f0b5a1b1.zip
CMake-b056bc34258267c4ae59c72e3777d0a0f0b5a1b1.tar.gz
CMake-b056bc34258267c4ae59c72e3777d0a0f0b5a1b1.tar.bz2
Fix most clang -Wextra-semi-stmt warnings in C++ files
Suppress one in code generated by flex.
Diffstat (limited to 'Tests/CMakeLib/testString.cxx')
-rw-r--r--Tests/CMakeLib/testString.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/CMakeLib/testString.cxx b/Tests/CMakeLib/testString.cxx
index 2aa1459..af5e41e 100644
--- a/Tests/CMakeLib/testString.cxx
+++ b/Tests/CMakeLib/testString.cxx
@@ -16,10 +16,12 @@
#include <utility>
#define ASSERT_TRUE(x) \
- if (!(x)) { \
- std::cout << "ASSERT_TRUE(" #x ") failed on line " << __LINE__ << "\n"; \
- return false; \
- }
+ do { \
+ if (!(x)) { \
+ std::cout << "ASSERT_TRUE(" #x ") failed on line " << __LINE__ << "\n"; \
+ return false; \
+ } \
+ } while (false)
static bool testConstructDefault()
{
@@ -144,7 +146,6 @@ static bool testConstructFromCStr()
{
std::cout << "testConstructFromCStr()\n";
return testFromCStr(cstr);
- ;
}
static bool testAssignFromCStr()
@@ -153,7 +154,6 @@ static bool testAssignFromCStr()
cm::String str;
str = cstr;
return testFromCStr(str);
- ;
}
static const std::string stdstr = "abc";