diff options
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r-- | Source/cmDocumentation.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index fafb079..6a817b4 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -139,10 +139,12 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os) } #define GET_OPT_ARGUMENT(target) \ - if ((i + 1 < argc) && !this->IsOption(argv[i + 1])) { \ - (target) = argv[i + 1]; \ - i = i + 1; \ - }; + do { \ + if ((i + 1 < argc) && !this->IsOption(argv[i + 1])) { \ + (target) = argv[i + 1]; \ + i = i + 1; \ + }; \ + } while (false) void cmDocumentation::WarnFormFromFilename( cmDocumentation::RequestedHelpItem& request, bool& result) |