mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-18 10:39:31 +00:00
Remove __attribute__ ((unused)), use -Wno-unused-parameter instead
The __attribute__ ((unused)) is useful sometimes to declare variables as intended to be unused, e.g. in callback functions. However, they tend to clutter up the code making hard to read. We therefore remove all uses of it and instead set -Wno-unused-parameter. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
de89b6647d
commit
99ef6eb884
10 files changed
+15
-22
No files matched your search
+2
-4
@@ -57,8 +57,6 @@
|
||||
|
||||
#include "uev.h"
|
||||
|
||||
#define UNUSED(arg) arg __attribute__ ((unused))
|
||||
|
||||
typedef struct {
|
||||
int index;
|
||||
} myarg_t;
|
||||
@@ -70,7 +68,7 @@ static int *pipes;
|
||||
static uev_t *evio;
|
||||
static uev_t *evto;
|
||||
|
||||
static void read_cb(uev_t *w, void *arg, int UNUSED(events))
|
||||
static void read_cb(uev_t *w, void *arg, int events)
|
||||
{
|
||||
int idx, widx;
|
||||
u_char ch;
|
||||
@@ -96,7 +94,7 @@ static void read_cb(uev_t *w, void *arg, int UNUSED(events))
|
||||
}
|
||||
}
|
||||
|
||||
static void timer_cb(uev_t UNUSED(*w), void UNUSED(*arg), int UNUSED(events))
|
||||
static void timer_cb(uev_t *w, void *arg, int events)
|
||||
{
|
||||
/* nop */
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user