mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-17 13:52:17 +01:00
inotify: Fix a few trivial -Wsign-conversion warnings
When building GIO with `-Wsign-conversion` enabled. In all of these cases, the implicit sign conversion cast is correct, so let’s make it explicit to indicate that we‘ve checked it. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3405
This commit is contained in:
@@ -260,7 +260,7 @@ ih_not_missing_callback (inotify_sub *sub)
|
||||
static GFileMonitorEvent
|
||||
ih_mask_to_EventFlags (guint32 mask)
|
||||
{
|
||||
mask &= ~IN_ISDIR;
|
||||
mask &= (guint32) ~IN_ISDIR;
|
||||
switch (mask)
|
||||
{
|
||||
case IN_MODIFY:
|
||||
@@ -287,6 +287,6 @@ ih_mask_to_EventFlags (guint32 mask)
|
||||
case IN_ACCESS:
|
||||
case IN_IGNORED:
|
||||
default:
|
||||
return -1;
|
||||
return (GFileMonitorEvent) -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ ik_source_can_dispatch_now (InotifyKernelSource *iks,
|
||||
return 0 <= dispatch_time && dispatch_time <= now;
|
||||
}
|
||||
|
||||
static gsize
|
||||
static size_t
|
||||
ik_source_read_some_events (InotifyKernelSource *iks,
|
||||
gchar *buffer,
|
||||
gsize buffer_len)
|
||||
@@ -169,7 +169,7 @@ again:
|
||||
else if (result == 0)
|
||||
g_error ("inotify unexpectedly hit eof");
|
||||
|
||||
return result;
|
||||
return (size_t) result;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
||||
@@ -482,7 +482,7 @@ ip_event_dispatch (GList *dir_list,
|
||||
*/
|
||||
if (sub->hardlinks)
|
||||
{
|
||||
event->mask &= ~IP_INOTIFY_FILE_MASK;
|
||||
event->mask &= (guint32) ~IP_INOTIFY_FILE_MASK;
|
||||
if (!event->mask)
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user