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:
Joachim Nilsson committed 2018-09-25 23:19:02 +02:00
1 parent de89b6647d
commit 99ef6eb884
10 files changed
+15 -22

No files matched your search

+2 -4
View File
@@ -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 */
}
-2
View File
@@ -33,8 +33,6 @@
#include "uev.h"
#define UNUSED(arg) arg __attribute__ ((unused))
static int _init(uev_ctx_t *ctx, int close_old)
{