mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 19:52:10 +01:00
Fixing signedness in g_ptr_array_insert():glib/garray.c
glib/garray.c: In function ‘g_ptr_array_insert’: glib/garray.c:1522:14: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] if (index_ < rarray->len) ^
This commit is contained in:
parent
3384ed3f7f
commit
a419146578
@ -1519,7 +1519,7 @@ g_ptr_array_insert (GPtrArray *array,
|
||||
if (index_ < 0)
|
||||
index_ = rarray->len;
|
||||
|
||||
if (index_ < rarray->len)
|
||||
if ((guint) index_ < rarray->len)
|
||||
memmove (&(rarray->pdata[index_ + 1]),
|
||||
&(rarray->pdata[index_]),
|
||||
(rarray->len - index_) * sizeof (gpointer));
|
||||
|
Loading…
x
Reference in New Issue
Block a user