Fixed (soon might be fatal) -Wformat warnings.
This commit is contained in:
parent
71e2d62a49
commit
6999b65340
@ -189,7 +189,7 @@ f_bs(char *arg)
|
||||
|
||||
res = get_num(arg);
|
||||
if (res < 1 || res > SSIZE_MAX)
|
||||
errx(1, "bs must be between 1 and %d", SSIZE_MAX);
|
||||
errx(1, "bs must be between 1 and %zd", SSIZE_MAX);
|
||||
in.dbsz = out.dbsz = (size_t)res;
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ f_cbs(char *arg)
|
||||
|
||||
res = get_num(arg);
|
||||
if (res < 1 || res > SSIZE_MAX)
|
||||
errx(1, "cbs must be between 1 and %d", SSIZE_MAX);
|
||||
errx(1, "cbs must be between 1 and %zd", SSIZE_MAX);
|
||||
cbsz = (size_t)res;
|
||||
}
|
||||
|
||||
|
@ -531,7 +531,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
|
||||
outfmt(&errout, "%s\n", startp);
|
||||
error((char *)NULL);
|
||||
}
|
||||
error("%.*s: parameter %snot set", p - str - 1,
|
||||
error("%.*s: parameter %snot set", (int)(p - str - 1),
|
||||
str, (varflags & VSNUL) ? "null or "
|
||||
: nullstr);
|
||||
return 0;
|
||||
@ -666,7 +666,8 @@ again: /* jump here after setting a variable with ${var=text} */
|
||||
case VSTRIMRIGHT:
|
||||
case VSTRIMRIGHTMAX:
|
||||
case VSLENGTH:
|
||||
error("%.*s: parameter not set", p - var - 1, var);
|
||||
error("%.*s: parameter not set", (int)(p - var - 1),
|
||||
var);
|
||||
}
|
||||
}
|
||||
if (set && subtype != VSPLUS) {
|
||||
|
@ -470,7 +470,7 @@ load_format(char *pagedb_path, int page)
|
||||
} else if (depth == 0 && ! BUFFERFULL(str_pagenum)) {
|
||||
strncat(str_pagenum, &c, 1);
|
||||
} else if (depth == 0) {
|
||||
errx(EX_OSFILE, "%s:%d: %s %d %s", pagedb_path,
|
||||
errx(EX_OSFILE, "%s:%d: %s %zd %s", pagedb_path,
|
||||
lineno, "page identifier exceeds",
|
||||
sizeof(str_pagenum) - 1, "characters");
|
||||
}
|
||||
@ -486,7 +486,7 @@ load_format(char *pagedb_path, int page)
|
||||
} else if (! BUFFERFULL(str_pagename)) {
|
||||
strncat(str_pagename, &c, 1);
|
||||
} else {
|
||||
errx(EX_OSFILE, "%s:%d: %s %d %s", pagedb_path,
|
||||
errx(EX_OSFILE, "%s:%d: %s %zd %s", pagedb_path,
|
||||
lineno, "page name exceeds",
|
||||
sizeof(str_pagenum) - 1, "characters");
|
||||
}
|
||||
@ -503,7 +503,7 @@ load_format(char *pagedb_path, int page)
|
||||
} else if (! BUFFERFULL(format)) {
|
||||
strncat(format, &c, 1);
|
||||
} else {
|
||||
errx(EX_OSFILE, "%s:%d: %s %d %s", pagedb_path,
|
||||
errx(EX_OSFILE, "%s:%d: %s %zd %s", pagedb_path,
|
||||
lineno, "page definition exceeds",
|
||||
sizeof(format) - 1, "characters");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user