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:
Leah Rowe
2026-04-01 10:03:41 +01:00
parent d91dd0ad81
commit 861f56375a
14 changed files with 143 additions and 154 deletions
+6 -6
View File
@@ -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());
}