summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2019-01-14 12:36:32 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-14 12:38:39 (GMT)
commita4841e12c0e3865a585774b118e7b9840bc1b253 (patch)
tree2541d75e05cc9d6946ea452d690ff883739c3ac0
parent8ca8daeb475fdcb2d15e508fe911bbc7ede7773a (diff)
downloadCMake-a4841e12c0e3865a585774b118e7b9840bc1b253.zip
CMake-a4841e12c0e3865a585774b118e7b9840bc1b253.tar.gz
CMake-a4841e12c0e3865a585774b118e7b9840bc1b253.tar.bz2
KWSys 2019-01-14 (1541d849)
Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 1541d8496d0ae0e7c10eabcedb55db95f72afa4a (master). Upstream Shortlog ----------------- Sean McBride (1): f44cbf93 Fixed clang -Wextra-semi-stmt warnings
-rw-r--r--ProcessUNIX.c2
-rw-r--r--testCommandLineArguments.cxx35
2 files changed, 19 insertions, 18 deletions
diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index 094c2ee..f65690b 100644
--- a/ProcessUNIX.c
+++ b/ProcessUNIX.c
@@ -1162,7 +1162,7 @@ static int kwsysProcessWaitForPipe(kwsysProcess* cp, char** data, int* length,
case KWSYSPE_PIPE_STDERR:
wd->PipeId = kwsysProcess_Pipe_STDERR;
break;
- };
+ }
return 1;
}
} else if (n < 0 && errno == EAGAIN) {
diff --git a/testCommandLineArguments.cxx b/testCommandLineArguments.cxx
index ef87436..15f9c02 100644
--- a/testCommandLineArguments.cxx
+++ b/testCommandLineArguments.cxx
@@ -165,25 +165,26 @@ int testCommandLineArguments(int argc, char* argv[])
}
size_t cc;
#define CompareTwoLists(list1, list_valid, lsize) \
- if (list1.size() != lsize) { \
- std::cerr << "Problem setting " #list1 ". Size is: " << list1.size() \
- << " should be: " << lsize << std::endl; \
- res = 1; \
- } else { \
- std::cout << #list1 " argument set:"; \
- for (cc = 0; cc < lsize; ++cc) { \
- std::cout << " " << list1[cc]; \
- if (!CompareTwoItemsOnList(list1[cc], list_valid[cc])) { \
- std::cerr << "Problem setting " #list1 ". Value of " << cc \
- << " is: [" << list1[cc] << "] <> [" << list_valid[cc] \
- << "]" << std::endl; \
- res = 1; \
- break; \
+ do { \
+ if (list1.size() != lsize) { \
+ std::cerr << "Problem setting " #list1 ". Size is: " << list1.size() \
+ << " should be: " << lsize << std::endl; \
+ res = 1; \
+ } else { \
+ std::cout << #list1 " argument set:"; \
+ for (cc = 0; cc < lsize; ++cc) { \
+ std::cout << " " << list1[cc]; \
+ if (!CompareTwoItemsOnList(list1[cc], list_valid[cc])) { \
+ std::cerr << "Problem setting " #list1 ". Value of " << cc \
+ << " is: [" << list1[cc] << "] <> [" << list_valid[cc] \
+ << "]" << std::endl; \
+ res = 1; \
+ break; \
+ } \
} \
+ std::cout << std::endl; \
} \
- std::cout << std::endl; \
- }
-
+ } while (0)
CompareTwoLists(numbers_argument, valid_numbers, 10);
CompareTwoLists(doubles_argument, valid_doubles, 3);
CompareTwoLists(bools_argument, valid_bools, 3);