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/nvmutil.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'util/libreboot-utils/nvmutil.c') diff --git a/util/libreboot-utils/nvmutil.c b/util/libreboot-utils/nvmutil.c index 26d15145..46e4a15c 100644 --- a/util/libreboot-utils/nvmutil.c +++ b/util/libreboot-utils/nvmutil.c @@ -6,6 +6,10 @@ * These images configure your Intel Gigabit Ethernet adapter. */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif + #include #include @@ -44,15 +48,15 @@ main(int argc, char *argv[]) xunveilx("/dev/urandom", "r"); #ifndef S_ISREG - err_exit(ECANCELED, + exitf( "Can't determine file types (S_ISREG undefined)"); #endif #if ((CHAR_BIT) != 8) - err_exit(ECANCELED, "Unsupported char size"); + exitf("Unsupported char size"); #endif if ((x = xstart(argc, argv)) == NULL) - err_exit(ECANCELED, "NULL state on init"); + exitf("NULL state on init"); /* parse user command */ /* TODO: CHECK ACCESSES VIA xstatus() */ @@ -72,7 +76,7 @@ main(int argc, char *argv[]) xpledgex("stdio flock rpath wpath cpath", NULL); if (cmd->run == NULL) - err_exit(errno, "Command not set"); + exitf("Command not set"); sanitize_command_list(); open_gbe_file(); @@ -88,7 +92,7 @@ main(int argc, char *argv[]) exit_cleanup(); if (f->io_err_gbe_bin) - err_exit(EIO, "%s: error writing final file"); + exitf("%s: error writing final file"); free_and_set_null(&f->tname); -- cgit v1.2.1