diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-04-01 10:03:41 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-04-01 10:03:41 +0100 |
| commit | 861f56375aee4291285e8c853896044ce04343cd (patch) | |
| tree | b9ed6e8ae1a8d0504036e4c45827df4b82dd4658 /util/libreboot-utils/lib/mkhtemp.c | |
| parent | d91dd0ad81f041e725599665d23c16d8c9f35b75 (diff) | |
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>
Diffstat (limited to 'util/libreboot-utils/lib/mkhtemp.c')
| -rw-r--r-- | util/libreboot-utils/lib/mkhtemp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/util/libreboot-utils/lib/mkhtemp.c b/util/libreboot-utils/lib/mkhtemp.c index d3ca92b0..4d7ad0bd 100644 --- a/util/libreboot-utils/lib/mkhtemp.c +++ b/util/libreboot-utils/lib/mkhtemp.c @@ -58,10 +58,8 @@ new_tmp_common(int *fd, char **path, int type, struct stat st; const char *templatestr; - size_t templatestr_len; size_t dirlen; - size_t destlen; char *dest = NULL; /* final path (will be written into "path") */ int saved_errno = errno; int dirfd = -1; @@ -114,9 +112,8 @@ new_tmp_common(int *fd, char **path, int type, else templatestr = "tmp.XXXXXXXXXX"; - /* may as well calculate in advance */ - destlen = slen(tmpdir, PATH_MAX, &dirlen) + 1 - + slen(templatestr, PATH_MAX, &templatestr_len); + /* may as well calculate in advance */ + dirlen = slen(tmpdir, PATH_MAX, &dirlen); /* full path: */ dest = scatn(3, (const char *[]) { tmpdir, "/", templatestr }, PATH_MAX, &dest); @@ -441,7 +438,6 @@ mkhtemp(int *fd, size_t retries; - int close_errno; int saved_errno = errno; int r; |
