mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-29 12:00:42 +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
+4
-4
@@ -55,12 +55,12 @@ static void timeout_cb(uev_t *w, void *arg, int events)
|
||||
uev_exit(w->ctx);
|
||||
}
|
||||
|
||||
static void periodic_task(uev_t UNUSED(*w), void UNUSED(*arg), int UNUSED(events))
|
||||
static void periodic_task(uev_t *w, void *arg, int events)
|
||||
{
|
||||
fprintf(stderr, "|");
|
||||
}
|
||||
|
||||
static void signal_cb(uev_t *w, void *UNUSED(arg), int events)
|
||||
static void signal_cb(uev_t *w, void *arg, int events)
|
||||
{
|
||||
if (UEV_ERROR == events) {
|
||||
fprintf(stderr, "Signal watcher failed, unrecoverable error.\n");
|
||||
@@ -70,7 +70,7 @@ static void signal_cb(uev_t *w, void *UNUSED(arg), int events)
|
||||
fprintf(stderr, w->signo == SIGINT ? "^Cv" : "^\v");
|
||||
}
|
||||
|
||||
static void pipe_read_cb(uev_t *w, void UNUSED(*arg), int events)
|
||||
static void pipe_read_cb(uev_t *w, void *arg, int events)
|
||||
{
|
||||
int len;
|
||||
char msg[50];
|
||||
@@ -102,7 +102,7 @@ static void pipe_read_cb(uev_t *w, void UNUSED(*arg), int events)
|
||||
fprintf(stderr, "%.*s.%d ", len, msg, len);
|
||||
}
|
||||
|
||||
static void pipe_write_cb(uev_t *w, void *arg, int UNUSED(events))
|
||||
static void pipe_write_cb(uev_t *w, void *arg, int events)
|
||||
{
|
||||
my_t *my = arg;
|
||||
char *msg = "TESTING";
|
||||
|
||||
Reference in new issue
Block a user