Remove UNUSED() macro, just use -Wno-unused instead

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-06-30 17:36:10 +02:00
1 parent fe82ab953c
commit 705b402344
3 files changed
+2 -11

No files matched your search

-4
View File
@@ -143,10 +143,6 @@ Helper Macros
Returns the number of elements in an array. From the great book, The Returns the number of elements in an array. From the great book, The
Practice of Programming, by Kernighan and Pike. Practice of Programming, by Kernighan and Pike.
- `UNUSED(var)`
Shorter and more readable version of `var __attribute__ ((unused))`
Generic Functions Generic Functions
----------------- -----------------
-5
View File
@@ -156,11 +156,6 @@ static inline int erase(const char *path)
#define NELEMS(array) (sizeof(array) / sizeof(array[0])) #define NELEMS(array) (sizeof(array) / sizeof(array[0]))
#endif #endif
/* Mark a function variable as unused, useful for generic callbacks */
#ifndef UNUSED
#define UNUSED(x) UNUSED_ ## x __attribute__ ((unused))
#endif
/* Does directory end with a slash? */ /* Does directory end with a slash? */
static inline int fisslashdir(char *dir) static inline int fisslashdir(char *dir)
{ {
+2 -2
View File
@@ -15,13 +15,13 @@ static char PIDFILE[42];
static int verbose = 0; static int verbose = 0;
static struct stat before, after; static struct stat before, after;
static void sigterm_handler(int UNUSED(signo)) static void sigterm_handler(int signo)
{ {
PRINT("Exiting ...\n"); PRINT("Exiting ...\n");
remove(PIDFILE); remove(PIDFILE);
} }
static void sigalrm_handler(int UNUSED(signo)) static void sigalrm_handler(int signo)
{ {
PRINT("Calling pidfile(%s)\n", pidfile_arg ?: "NULL"); PRINT("Calling pidfile(%s)\n", pidfile_arg ?: "NULL");
if (pidfile(pidfile_arg)) if (pidfile(pidfile_arg))