tools-common: add the UNUSED attribute and use it in gpioset
authorBartosz Golaszewski <bartekgola@gmail.com>
Fri, 6 Jan 2017 17:16:12 +0000 (18:16 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Fri, 6 Jan 2017 17:16:12 +0000 (18:16 +0100)
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
gpioset.c
tools-common.h

index 40da1a01204255380fea556b680fc3603f358959..d74d59bf594809b658bd14dc0f4690e6c3bab689 100644 (file)
--- 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();
 }
 
index 1cfef33992faa1b12974dd2ec8558f081abe151c..dfb379dd507494b2150aa23b4257432a35b9f49d 100644 (file)
@@ -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, ...);