Fix signedness warning in gio/gdbusdaemon.c:is_key()

gio/gdbusdaemon.c: In function ‘is_key’:
gio/gdbusdaemon.c:213:11: error: comparison of integer expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’} and ‘long int’
  213 |   if (len != key_end - key_start)
      |           ^~
This commit is contained in:
Emmanuel Fleury 2020-11-17 11:23:47 +01:00 committed by Philip Withnall
parent 73499dcb73
commit 6d08c2f5ba

View File

@ -210,7 +210,8 @@ is_key (const char *key_start, const char *key_end, const char *value)
{
gsize len = strlen (value);
if (len != key_end - key_start)
g_assert (key_end >= key_start);
if (len != (gsize) (key_end - key_start))
return FALSE;
return strncmp (key_start, value, len) == 0;