1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Use string literal format strings to quiet clang warnings.

This commit is contained in:
Ed Maste 2011-01-23 14:08:59 +00:00
parent a66ac850d7
commit 89db1db777
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217749

View File

@ -129,7 +129,7 @@ kernel_from_dumpnr(int nr)
snprintf(path, sizeof(path), "%s/info.%d", crashdir, nr); snprintf(path, sizeof(path), "%s/info.%d", crashdir, nr);
info = fopen(path, "r"); info = fopen(path, "r");
if (info == NULL) { if (info == NULL) {
warn(path); warn("%s", path);
return; return;
} }
while (fgets(path, sizeof(path), info) != NULL) { while (fgets(path, sizeof(path), info) != NULL) {
@ -408,7 +408,7 @@ main(int argc, char *argv[])
if (dumpnr >= 0) { if (dumpnr >= 0) {
snprintf(path, sizeof(path), "%s/vmcore.%d", crashdir, dumpnr); snprintf(path, sizeof(path), "%s/vmcore.%d", crashdir, dumpnr);
if (stat(path, &st) == -1) if (stat(path, &st) == -1)
err(1, path); err(1, "%s", path);
if (!S_ISREG(st.st_mode)) if (!S_ISREG(st.st_mode))
errx(1, "%s: not a regular file", path); errx(1, "%s: not a regular file", path);
vmcore = strdup(path); vmcore = strdup(path);