From daa91bb61f485870030ccf38dbcf4bbdf27e199c Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Fri, 6 Jan 2017 18:16:12 +0100 Subject: [PATCH] tools-common: add the UNUSED attribute and use it in gpioset Signed-off-by: Bartosz Golaszewski --- gpioset.c | 4 +--- tools-common.h | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gpioset.c b/gpioset.c index 40da1a0..d74d59b 100644 --- a/gpioset.c +++ b/gpioset.c @@ -35,10 +35,8 @@ static void print_help(void) printf("This program reserves the GPIO line, sets its value and waits for the user to press ENTER before releasing the line\n"); } -static void wait_for_enter(void *data) +static void wait_for_enter(void *data UNUSED) { - (void)data; - getchar(); } diff --git a/tools-common.h b/tools-common.h index 1cfef33..dfb379d 100644 --- a/tools-common.h +++ b/tools-common.h @@ -18,6 +18,8 @@ * common code. */ +#define UNUSED __attribute__((unused)) + void set_progname(char *name); const char * get_progname(void); void die(const char *fmt, ...); -- 2.30.2