diff options
author | Philip Withnall <withnall@endlessm.com> | 2019-10-08 13:49:40 +0100 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2019-10-08 13:49:40 +0100 |
commit | e257e17d2e46e818426688c972123ae28f1e3c03 (patch) | |
tree | fb787c58cf6a6d29d5706eeb34c864557bca7747 /gio/inotify | |
parent | 1bda4db213bf776143c6d68c4580fd580b1eab5a (diff) | |
download | glib-e257e17d2e46e818426688c972123ae28f1e3c03.tar.gz |
inotify: Fix some enum comparisons to integers
`-1` isn’t a valid member of the enum, so cast to `int` first. This
fixes a compiler warning on Android.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'gio/inotify')
-rw-r--r-- | gio/inotify/inotify-helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/inotify/inotify-helper.c b/gio/inotify/inotify-helper.c index d94458753..c2b98b167 100644 --- a/gio/inotify/inotify-helper.c +++ b/gio/inotify/inotify-helper.c @@ -193,7 +193,7 @@ ih_event_callback (ik_event_t *event, * properly. If not, the assumption we have made about event->mask * only ever having a single bit set (apart from IN_ISDIR) is false. * The kernel documentation is lacking here. */ - g_assert (event_flags != -1); + g_assert ((int) event_flags != -1); interesting = g_file_monitor_source_handle_event (sub->user_data, event_flags, event->name, NULL, other, event->timestamp); @@ -201,7 +201,7 @@ ih_event_callback (ik_event_t *event, g_object_unref (other); } } - else if (event_flags != -1) + else if ((int) event_flags != -1) /* unpaired event -- no 'other' field */ interesting = g_file_monitor_source_handle_event (sub->user_data, event_flags, event->name, NULL, NULL, event->timestamp); |