mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Fix signedness warning in gio/tests/testfilemonitor.c
gio/tests/testfilemonitor.c: In function ‘check_expected_events’: gio/tests/testfilemonitor.c:124:39: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 124 | for (i = 0, li = 0, l = recorded; i < n_expected && l != NULL;) | ^
This commit is contained in:
parent
0a741d85a7
commit
34cd8a98c7
@ -120,7 +120,8 @@ check_expected_events (RecordedEvent *expected,
|
|||||||
GList *recorded,
|
GList *recorded,
|
||||||
Environment env)
|
Environment env)
|
||||||
{
|
{
|
||||||
gint i, li;
|
gsize i;
|
||||||
|
gint li;
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
for (i = 0, li = 0, l = recorded; i < n_expected && l != NULL;)
|
for (i = 0, li = 0, l = recorded; i < n_expected && l != NULL;)
|
||||||
@ -219,7 +220,7 @@ check_expected_events (RecordedEvent *expected,
|
|||||||
e2->event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT)
|
e2->event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT)
|
||||||
{
|
{
|
||||||
g_test_message ("Event CHANGES_DONE_HINT ignored at "
|
g_test_message ("Event CHANGES_DONE_HINT ignored at "
|
||||||
"expected index %d, recorded index %d", i, li);
|
"expected index %" G_GSIZE_FORMAT ", recorded index %d", i, li);
|
||||||
li++, l = l->next;
|
li++, l = l->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -227,7 +228,7 @@ check_expected_events (RecordedEvent *expected,
|
|||||||
* the event doesn't match, it means the expected event has lost. */
|
* the event doesn't match, it means the expected event has lost. */
|
||||||
else if (env & e1->optional)
|
else if (env & e1->optional)
|
||||||
{
|
{
|
||||||
g_test_message ("Event %d at expected index %d skipped because "
|
g_test_message ("Event %d at expected index %" G_GSIZE_FORMAT " skipped because "
|
||||||
"it is marked as optional", e1->event_type, i);
|
"it is marked as optional", e1->event_type, i);
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user