Stefan Reinauer has submitted this change. ( https://review.coreboot.org/c/em100/+/37071 )
Change subject: Fix compiler warnings ......................................................................
Fix compiler warnings
The signal handler is not used outside of em100.c and it's not using its argument.
For convenience, add __packed and __unused to em100.h
Change-Id: I981104ac95d648a341bce8348f01bd7eead1da9e Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Reviewed-on: https://review.coreboot.org/c/em100/+/37071 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com --- M em100.c M em100.h M firmware.c 3 files changed, 6 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/em100.c b/em100.c index c806413..5c56d2d 100644 --- a/em100.c +++ b/em100.c @@ -29,7 +29,8 @@
volatile int do_exit_flag = 0;
-void exit_handler(int sig) { +static void exit_handler(int sig __unused) +{ do_exit_flag = 1; }
diff --git a/em100.h b/em100.h index 9ebcb13..72518d1 100644 --- a/em100.h +++ b/em100.h @@ -20,6 +20,9 @@
#include <libusb.h>
+#define __unused __attribute__((unused)) +#define __packed __attribute__((packed)) + struct em100 { libusb_device_handle *dev; libusb_context *ctx; diff --git a/firmware.c b/firmware.c index 6e2ff36..dd1a173 100644 --- a/firmware.c +++ b/firmware.c @@ -184,7 +184,7 @@ } fclose(fw);
-#if DEBUG +#ifdef DEBUG hexdump(data, rom_size); #endif free(data);