diff options
author | Sean McBride <sean@rogue-research.com> | 2019-01-11 21:58:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-15 19:09:46 (GMT) |
commit | b056bc34258267c4ae59c72e3777d0a0f0b5a1b1 (patch) | |
tree | aa1632cdb773244aa402c0cf7ccd4f6e53a28536 /Source/cmGraphVizWriter.cxx | |
parent | da566d4de885130e182edc80f13691f5ca24bb61 (diff) | |
download | CMake-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/cmGraphVizWriter.cxx')
-rw-r--r-- | Source/cmGraphVizWriter.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 754fa7d..199c8e2 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -198,12 +198,12 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, std::cout << "Reading GraphViz options file: " << inFileName << std::endl; #define __set_if_set(var, cmakeDefinition) \ - { \ + do { \ const char* value = mf.GetDefinition(cmakeDefinition); \ if (value) { \ (var) = value; \ } \ - } + } while (false) __set_if_set(this->GraphType, "GRAPHVIZ_GRAPH_TYPE"); __set_if_set(this->GraphName, "GRAPHVIZ_GRAPH_NAME"); @@ -211,12 +211,12 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, __set_if_set(this->GraphNodePrefix, "GRAPHVIZ_NODE_PREFIX"); #define __set_bool_if_set(var, cmakeDefinition) \ - { \ + do { \ const char* value = mf.GetDefinition(cmakeDefinition); \ if (value) { \ (var) = mf.IsOn(cmakeDefinition); \ } \ - } + } while (false) __set_bool_if_set(this->GenerateForExecutables, "GRAPHVIZ_EXECUTABLES"); __set_bool_if_set(this->GenerateForStaticLibs, "GRAPHVIZ_STATIC_LIBS"); |