]> granicus.if.org Git - libevent/commitdiff
evmap: use approparite type for changes to avoid warnings under windows
authorAzat Khuzhin <azat@libevent.org>
Tue, 29 Jan 2019 18:31:19 +0000 (21:31 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sat, 2 Feb 2019 12:18:08 +0000 (15:18 +0300)
(cherry picked from commit 74c10894117f9dd2b230ec8d0e30d41c08df3b45)

evmap.c

diff --git a/evmap.c b/evmap.c
index 31ab4feee8cca406529e15fa2273b97d8229dd40..9f46dd0f06d3b343ccbd34929f46aa56741a8333 100644 (file)
--- a/evmap.c
+++ b/evmap.c
@@ -859,7 +859,7 @@ event_changelist_add_(struct event_base *base, evutil_socket_t fd, short old, sh
        struct event_changelist *changelist = &base->changelist;
        struct event_changelist_fdinfo *fdinfo = p;
        struct event_change *change;
-       short evchange = EV_CHANGE_ADD | (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
+       ev_uint8_t evchange = EV_CHANGE_ADD | (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
 
        event_changelist_check(base);
 
@@ -889,7 +889,7 @@ event_changelist_del_(struct event_base *base, evutil_socket_t fd, short old, sh
        struct event_changelist *changelist = &base->changelist;
        struct event_changelist_fdinfo *fdinfo = p;
        struct event_change *change;
-       short del = EV_CHANGE_DEL | (events & EV_ET);
+       ev_uint8_t del = EV_CHANGE_DEL | (events & EV_ET);
 
        event_changelist_check(base);
        change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);