[glib: 6/10] Fixing signedness in g_ptr_array_insert():glib/garray.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 6/10] Fixing signedness in g_ptr_array_insert():glib/garray.c
- Date: Thu, 31 Jan 2019 13:16:07 +0000 (UTC)
commit a419146578a42c760cff684292465b38df855f75
Author: Emmanuel Fleury <emmanuel fleury u-bordeaux fr>
Date: Sat Jan 26 18:17:17 2019 +0100
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)
^
glib/garray.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/garray.c b/glib/garray.c
index 0e83db002..84c816da6 100644
--- a/glib/garray.c
+++ b/glib/garray.c
@@ -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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]