Fix signedness warning in glib/gdate.c

glib/gdate.c: In function 'win32_strftime_helper':
glib/gdate.c:2582:12: warning: comparison of integer expressions of different signedness: 'gsize' {aka 'long long unsigned int'} and 'glong' {aka 'long int'}
   if (slen <= convlen)
            ^~
This commit is contained in:
Emmanuel Fleury 2021-05-14 12:22:15 +02:00
parent 4ec06aa0c1
commit 5471c13f65

View File

@ -2588,7 +2588,8 @@ win32_strftime_helper (const GDate *d,
return 0;
}
if (slen <= convlen)
g_assert (convlen >= 0);
if ((gsize) convlen >= slen)
{
/* Ensure only whole characters are copied into the buffer. */
gchar *end = g_utf8_find_prev_char (convbuf, convbuf + slen);