mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 16:26:17 +01:00
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:
parent
4ec06aa0c1
commit
5471c13f65
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user