Fixing signedness in g_ptr_array_maybe_expand():garray.c

../glib.git/glib/garray.c: In function ‘g_ptr_array_maybe_expand’:
../glib.git/glib/garray.c:1172:43: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘gint’ {aka ‘int’} [-Werror=sign-compare]
   if G_UNLIKELY ((G_MAXUINT - array->len) < len)
This commit is contained in:
Emmanuel Fleury 2019-01-26 12:21:23 +01:00
parent 9402940919
commit 5ca8c2fa8f

View File

@ -907,7 +907,7 @@ struct _GRealPtrArray
*/
static void g_ptr_array_maybe_expand (GRealPtrArray *array,
gint len);
guint len);
/**
* g_ptr_array_new:
@ -1166,7 +1166,7 @@ ptr_array_free (GPtrArray *array,
static void
g_ptr_array_maybe_expand (GRealPtrArray *array,
gint len)
guint len)
{
/* Detect potential overflow */
if G_UNLIKELY ((G_MAXUINT - array->len) < len)