From 861f56375aee4291285e8c853896044ce04343cd Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 1 Apr 2026 10:03:41 +0100 Subject: 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 --- util/libreboot-utils/mkhtemp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'util/libreboot-utils/mkhtemp.c') diff --git a/util/libreboot-utils/mkhtemp.c b/util/libreboot-utils/mkhtemp.c index 65e637e9..ced8aa96 100644 --- a/util/libreboot-utils/mkhtemp.c +++ b/util/libreboot-utils/mkhtemp.c @@ -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()); } -- cgit v1.2.1