From b0f9ddd295f432e4de31ce613da96a6281ca3eb6 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 14 Jan 2020 10:21:55 +0100 Subject: [PATCH] icera: fix warnings with -Wsign-compare MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit icera/mm-modem-helpers-icera.c:256:13: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] 256 | num != expected_cid) { | ^~ --- plugins/icera/mm-modem-helpers-icera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/icera/mm-modem-helpers-icera.c b/plugins/icera/mm-modem-helpers-icera.c index 7c1da9a5..57963aba 100644 --- a/plugins/icera/mm-modem-helpers-icera.c +++ b/plugins/icera/mm-modem-helpers-icera.c @@ -216,7 +216,7 @@ mm_icera_parse_ipdpaddr_response (const gchar *response, gboolean success = FALSE; char **items; guint num_items, i; - gint num; + guint num; g_return_val_if_fail (out_ip4_config, FALSE); g_return_val_if_fail (out_ip6_config, FALSE); @@ -252,7 +252,7 @@ mm_icera_parse_ipdpaddr_response (const gchar *response, } /* Validate context ID */ - if (!mm_get_int_from_str (items[0], &num) || + if (!mm_get_uint_from_str (items[0], &num) || num != expected_cid) { g_set_error (error, MM_CORE_ERROR,