[core] fdevent_libev: workaround compiler warning

workaround compiler warning w/ gcc -Wstrict-aliasing=2 -fstrict-aliasing
This commit is contained in:
Glenn Strauss 2016-07-13 16:06:58 -04:00
parent bd8b58cea5
commit 86cd135b25
1 changed files with 3 additions and 1 deletions

View File

@ -132,6 +132,8 @@ static int fdevent_libev_reset(fdevents *ev) {
}
int fdevent_libev_init(fdevents *ev) {
struct ev_timer * const timer = &timeout_watcher;
ev->type = FDEVENT_HANDLER_LIBEV;
#define SET(x) \
ev->x = fdevent_libev_##x;
@ -154,7 +156,7 @@ int fdevent_libev_init(fdevents *ev) {
return -1;
}
ev_timer_init(&timeout_watcher, timeout_watcher_cb, 0.0, 1.0);
ev_timer_init(timer, timeout_watcher_cb, 0.0, 1.0);
return 0;
}