Remove unused parameter warning in libev adapter
A warning in `redisLibevTimeout(..)` is triggered when building the libev adapter with Clang using -Wextra/-Wunused-parameter. Works fine with gcc..master
parent
7ad38dc4a8
commit
c4333203e3
|
@ -66,8 +66,9 @@ static void redisLibevWriteEvent(EV_P_ ev_io *watcher, int revents) {
|
|||
|
||||
static void redisLibevAddRead(void *privdata) {
|
||||
redisLibevEvents *e = (redisLibevEvents*)privdata;
|
||||
#if EV_MULTIPLICITY
|
||||
struct ev_loop *loop = e->loop;
|
||||
((void)loop);
|
||||
#endif
|
||||
if (!e->reading) {
|
||||
e->reading = 1;
|
||||
ev_io_start(EV_A_ &e->rev);
|
||||
|
@ -76,8 +77,9 @@ static void redisLibevAddRead(void *privdata) {
|
|||
|
||||
static void redisLibevDelRead(void *privdata) {
|
||||
redisLibevEvents *e = (redisLibevEvents*)privdata;
|
||||
#if EV_MULTIPLICITY
|
||||
struct ev_loop *loop = e->loop;
|
||||
((void)loop);
|
||||
#endif
|
||||
if (e->reading) {
|
||||
e->reading = 0;
|
||||
ev_io_stop(EV_A_ &e->rev);
|
||||
|
@ -86,8 +88,9 @@ static void redisLibevDelRead(void *privdata) {
|
|||
|
||||
static void redisLibevAddWrite(void *privdata) {
|
||||
redisLibevEvents *e = (redisLibevEvents*)privdata;
|
||||
#if EV_MULTIPLICITY
|
||||
struct ev_loop *loop = e->loop;
|
||||
((void)loop);
|
||||
#endif
|
||||
if (!e->writing) {
|
||||
e->writing = 1;
|
||||
ev_io_start(EV_A_ &e->wev);
|
||||
|
@ -96,8 +99,9 @@ static void redisLibevAddWrite(void *privdata) {
|
|||
|
||||
static void redisLibevDelWrite(void *privdata) {
|
||||
redisLibevEvents *e = (redisLibevEvents*)privdata;
|
||||
#if EV_MULTIPLICITY
|
||||
struct ev_loop *loop = e->loop;
|
||||
((void)loop);
|
||||
#endif
|
||||
if (e->writing) {
|
||||
e->writing = 0;
|
||||
ev_io_stop(EV_A_ &e->wev);
|
||||
|
@ -106,8 +110,9 @@ static void redisLibevDelWrite(void *privdata) {
|
|||
|
||||
static void redisLibevStopTimer(void *privdata) {
|
||||
redisLibevEvents *e = (redisLibevEvents*)privdata;
|
||||
#if EV_MULTIPLICITY
|
||||
struct ev_loop *loop = e->loop;
|
||||
((void)loop);
|
||||
#endif
|
||||
ev_timer_stop(EV_A_ &e->timer);
|
||||
}
|
||||
|
||||
|
@ -120,6 +125,9 @@ static void redisLibevCleanup(void *privdata) {
|
|||
}
|
||||
|
||||
static void redisLibevTimeout(EV_P_ ev_timer *timer, int revents) {
|
||||
#if EV_MULTIPLICITY
|
||||
((void)EV_A);
|
||||
#endif
|
||||
((void)revents);
|
||||
redisLibevEvents *e = (redisLibevEvents*)timer->data;
|
||||
redisAsyncHandleTimeout(e->context);
|
||||
|
@ -127,8 +135,9 @@ static void redisLibevTimeout(EV_P_ ev_timer *timer, int revents) {
|
|||
|
||||
static void redisLibevSetTimeout(void *privdata, struct timeval tv) {
|
||||
redisLibevEvents *e = (redisLibevEvents*)privdata;
|
||||
#if EV_MULTIPLICITY
|
||||
struct ev_loop *loop = e->loop;
|
||||
((void)loop);
|
||||
#endif
|
||||
|
||||
if (!ev_is_active(&e->timer)) {
|
||||
ev_init(&e->timer, redisLibevTimeout);
|
||||
|
|
Loading…
Reference in New Issue