mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 09:46:59 +02:00
libreboot-utils: fix ALL compiler warnings
i wasn't using strict mode enough in make: make strict now it compiles cleanly. mostly removing unused variables, fixing implicit conversions, etc. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -95,7 +95,7 @@ main(int argc, char *argv[])
|
||||
p > template && *--p == 'X'; xc++);
|
||||
|
||||
if (xc < 3) /* the gnu mktemp errs on less than 3 */
|
||||
err_exit(EINVAL,
|
||||
exitf(
|
||||
"template must have 3 X or more on end (12+ advised");
|
||||
}
|
||||
|
||||
@@ -109,21 +109,21 @@ main(int argc, char *argv[])
|
||||
if (tmpdir != NULL) {
|
||||
rp = realpath(tmpdir, resolved);
|
||||
if (rp == NULL)
|
||||
err_exit(errno, "%s", tmpdir);
|
||||
exitf("%s", tmpdir);
|
||||
|
||||
tmpdir = resolved;
|
||||
}
|
||||
|
||||
if (new_tmp_common(&fd, &s, type,
|
||||
tmpdir, template) < 0)
|
||||
err_exit(errno, "%s", s);
|
||||
exitf("%s", s);
|
||||
|
||||
xpledgex("stdio", NULL);
|
||||
|
||||
if (s == NULL)
|
||||
err_exit(EFAULT, "bad string initialisation");
|
||||
exitf("bad string initialisation");
|
||||
if (*s == '\0')
|
||||
err_exit(EFAULT, "empty string initialisation");
|
||||
exitf("empty string initialisation");
|
||||
|
||||
slen(s, PATH_MAX, &len); /* Nullterminierung prüfen */
|
||||
/* for good measure. (bonus: also re-checks length overflow) */
|
||||
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
err_usage:
|
||||
err_exit(EINVAL,
|
||||
exitf(
|
||||
"usage: %s [-d] [-p dir] [template]\n", lbgetprogname());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user