summaryrefslogtreecommitdiffstats
path: root/Source/CPack
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 /Source/CPack
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 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index b43f1c9..1756218 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -112,13 +112,15 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
return 0; \
} \
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
- if (!(archive)) { \
- cmCPackLogger(cmCPackLog::LOG_ERROR, \
- "Problem to create archive <" \
- << (filename) << ">, ERROR = " << (archive).GetError() \
- << std::endl); \
- return 0; \
- }
+ do { \
+ if (!(archive)) { \
+ cmCPackLogger(cmCPackLog::LOG_ERROR, \
+ "Problem to create archive <" \
+ << (filename) << ">, ERROR = " << (archive).GetError() \
+ << std::endl); \
+ return 0; \
+ } \
+ } while (false)
int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
{