mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 04:40:18 -05:00
clang-tidy: address readability-else-after-return lint
This commit is contained in:
@@ -21,7 +21,8 @@ int main(int argc, const char* argv[])
|
|||||||
}
|
}
|
||||||
if (strcmp(str, substring_success) == 0) {
|
if (strcmp(str, substring_success) == 0) {
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
} else if (strcmp(str, substring_failure) == 0) {
|
}
|
||||||
|
if (strcmp(str, substring_failure) == 0) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "Failed to find string '%s' in '%s'\n", substring_success,
|
fprintf(stderr, "Failed to find string '%s' in '%s'\n", substring_success,
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ int main(int argc, char* argv[])
|
|||||||
fprintf(stdout, "stdout from bad command line arg '-bad'\n");
|
fprintf(stdout, "stdout from bad command line arg '-bad'\n");
|
||||||
fprintf(stderr, "stderr from bad command line arg '-bad'\n");
|
fprintf(stderr, "stderr from bad command line arg '-bad'\n");
|
||||||
return 1;
|
return 1;
|
||||||
} else if (strcmp(argv[i], "-error") == 0) {
|
}
|
||||||
|
if (strcmp(argv[i], "-error") == 0) {
|
||||||
// The real cppcheck allows to set the exitcode with --error-exitcode
|
// The real cppcheck allows to set the exitcode with --error-exitcode
|
||||||
result = 5;
|
result = 5;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user