Fix signedness warning in glib/gcharset.c

glib/gcharset.c:380:35: warning: comparison of integer expressions of different signedness: 'long long int' and 'long long unsigned int'
           else if (modifier - dot < sizeof (buf))
                                   ^
This commit is contained in:
Emmanuel Fleury 2021-05-14 10:51:46 +02:00
parent 33c2968669
commit 74c3c5b75d

View File

@ -377,7 +377,7 @@ g_get_console_charset (const char **charset)
modifier = strchr (dot, '@');
if (modifier == NULL)
raw = dot;
else if (modifier - dot < sizeof (buf))
else if ((gsize) (modifier - dot) < sizeof (buf))
{
memcpy (buf, dot, modifier - dot);
buf[modifier - dot] = '\0';