From 68f3eeeaa785e77289f6c7f276400d61bbb7fd22 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 31 Jan 2020 09:31:57 +0100 Subject: [PATCH] option,hso: fix warnings with -Wsign-compare MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit option/mm-broadband-bearer-hso.c: In function ‘ip_config_ready’: option/mm-broadband-bearer-hso.c:128:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] 128 | num != ctx->cid) { | ^~ --- plugins/option/mm-broadband-bearer-hso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/option/mm-broadband-bearer-hso.c b/plugins/option/mm-broadband-bearer-hso.c index 96e602df..d626a64f 100644 --- a/plugins/option/mm-broadband-bearer-hso.c +++ b/plugins/option/mm-broadband-bearer-hso.c @@ -122,9 +122,9 @@ ip_config_ready (MMBaseModem *modem, for (i = 0, dns_i = 0; items[i]; i++) { if (i == 0) { /* CID */ - gint num; + guint num; - if (!mm_get_int_from_str (items[i], &num) || + if (!mm_get_uint_from_str (items[i], &num) || num != ctx->cid) { error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED,