diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-11 13:46:34 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-31 14:52:49 +0100 |
commit | 1f94d3f5f85d72a98c7e957c687a28bead54fcf5 (patch) | |
tree | f8e6eb914fe05546e70021f9846b497d85b45d1d /src | |
parent | 02e5015b5c98ca9903bf3ea296165aea40b9f381 (diff) |
modem-helpers: fix warnings with -Wsign-compare
mm-modem-helpers.c: In function ‘parse_uint’:
mm-modem-helpers.c:1953:36: error: comparison of integer expressions of different signedness: ‘gulong’ {aka ‘long unsigned int’} and ‘glong’ {aka ‘long int’} [-Werror=sign-compare]
1953 | if ((nmin == nmax) || (ret >= nmin && ret <= nmax))
| ^~
mm-modem-helpers.c:1953:51: error: comparison of integer expressions of different signedness: ‘gulong’ {aka ‘long unsigned int’} and ‘glong’ {aka ‘long int’} [-Werror=sign-compare]
1953 | if ((nmin == nmax) || (ret >= nmin && ret <= nmax))
| ^~
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-modem-helpers.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index 98adb87f..efd24649 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -1932,7 +1932,11 @@ mm_3gpp_parse_cgact_read_response (const gchar *reply, /*************************************************************************/ static gulong -parse_uint (char *str, int base, glong nmin, glong nmax, gboolean *valid) +parse_uint (gchar *str, + gint base, + gulong nmin, + gulong nmax, + gboolean *valid) { gulong ret = 0; gchar *endquote; @@ -4677,7 +4681,7 @@ mm_cdma_parse_eri (const gchar *reply, *out_ind = ind; while (iter->num != -1) { - if (iter->num == ind) { + if ((guint)iter->num == ind) { *out_roaming = iter->roam_ind; if (out_desc) *out_desc = iter->banner; |