Quiet clang analyzer false positive in regress tests.
This commit is contained in:
@@ -91,7 +91,7 @@ main(int argc, char *argv[])
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (errors != 0) {
|
if (ntests != 0) {
|
||||||
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
}
|
}
|
||||||
|
@@ -183,8 +183,10 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
ntests++;
|
ntests++;
|
||||||
|
|
||||||
printf("%s: %d tests run, %d errors, %d%% success rate\n", getprogname(),
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -92,8 +92,10 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
sudo_dso_unload(handle);
|
sudo_dso_unload(handle);
|
||||||
|
|
||||||
printf("%s: %d tests run, %d errors, %d%% success rate\n", getprogname(),
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -144,8 +144,10 @@ main(int argc, char *argv[])
|
|||||||
free(edit_argv);
|
free(edit_argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s: %d tests run, %d errors, %d%% success rate\n", getprogname(),
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -96,8 +96,10 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s: %d tests run, %d errors, %d%% success rate\n", getprogname(),
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,10 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
ntests *= 2; /* we test in both directions */
|
ntests *= 2; /* we test in both directions */
|
||||||
|
|
||||||
printf("check_base64: %d tests run, %d errors, %d%% success rate\n",
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -175,8 +175,10 @@ main(int argc, char *argv[])
|
|||||||
errors += do_tests(check_fill_args, args_data, nitems(args_data));
|
errors += do_tests(check_fill_args, args_data, nitems(args_data));
|
||||||
|
|
||||||
ntests = nitems(txt_data) + nitems(cmd_data) + nitems(args_data);
|
ntests = nitems(txt_data) + nitems(cmd_data) + nitems(args_data);
|
||||||
printf("%s: %d tests run, %d errors, %d%% success rate\n", getprogname(),
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -77,7 +77,9 @@ main(int argc, char *argv[])
|
|||||||
errors++;
|
errors++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("check_gentime: %d tests run, %d errors, %d%% success rate\n",
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -75,7 +75,9 @@ main(int argc, char *argv[])
|
|||||||
errors++;
|
errors++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("check_hexchar: %d tests run, %d errors, %d%% success rate\n",
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -111,8 +111,10 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s: %d tests run, %d errors, %d%% success rate\n", getprogname(),
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
@@ -136,8 +136,10 @@ main(int argc, char *argv[])
|
|||||||
test_strvec_join(' ', &ntests, &errors);
|
test_strvec_join(' ', &ntests, &errors);
|
||||||
test_strvec_join('\n', &ntests, &errors);
|
test_strvec_join('\n', &ntests, &errors);
|
||||||
|
|
||||||
printf("%s: %d tests run, %d errors, %d%% success rate\n", getprogname(),
|
if (ntests != 0) {
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
printf("%s: %d tests run, %d errors, %d%% success rate\n",
|
||||||
|
getprogname(), ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user