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