In usr.bin/indent/io.c, fix a few warnings about format strings not being literals.
MFC after: 1 week
This commit is contained in:
parent
d28023bd09
commit
f2b4c8af68
@ -581,12 +581,12 @@ diag2(int level, const char *msg)
|
|||||||
found_err = 1;
|
found_err = 1;
|
||||||
if (output == stdout) {
|
if (output == stdout) {
|
||||||
fprintf(stdout, "/**INDENT** %s@%d: ", level == 0 ? "Warning" : "Error", line_no);
|
fprintf(stdout, "/**INDENT** %s@%d: ", level == 0 ? "Warning" : "Error", line_no);
|
||||||
fprintf(stdout, msg);
|
fprintf(stdout, "%s", msg);
|
||||||
fprintf(stdout, " */\n");
|
fprintf(stdout, " */\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, "%s@%d: ", level == 0 ? "Warning" : "Error", line_no);
|
fprintf(stderr, "%s@%d: ", level == 0 ? "Warning" : "Error", line_no);
|
||||||
fprintf(stderr, msg);
|
fprintf(stderr, "%s", msg);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user