diff options
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/ProcessUNIX.c | 2 | ||||
-rw-r--r-- | Source/kwsys/testCommandLineArguments.cxx | 35 |
2 files changed, 19 insertions, 18 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 094c2ee23e..f65690b314 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/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/Source/kwsys/testCommandLineArguments.cxx b/Source/kwsys/testCommandLineArguments.cxx index ef874361fa..15f9c02ba9 100644 --- a/Source/kwsys/testCommandLineArguments.cxx +++ b/Source/kwsys/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); |