huawei: fix warnings with -Wsign-compare
huawei/mm-modem-helpers-huawei.c: In function ‘mm_huawei_parse_prefmode_response’: huawei/mm-modem-helpers-huawei.c:550:18: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘const unsigned int’} [-Werror=sign-compare] 550 | if (mode == combination->prefmode) | ^~
This commit is contained in:
@@ -521,7 +521,7 @@ mm_huawei_parse_prefmode_response (const gchar *response,
|
|||||||
const GArray *supported_mode_combinations,
|
const GArray *supported_mode_combinations,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
gint mode;
|
guint mode;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
/* Format:
|
/* Format:
|
||||||
@@ -530,7 +530,7 @@ mm_huawei_parse_prefmode_response (const gchar *response,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
response = mm_strip_tag (response, "^PREFMODE:");
|
response = mm_strip_tag (response, "^PREFMODE:");
|
||||||
if (!sscanf (response, "%d", &mode)) {
|
if (!mm_get_uint_from_str (response, &mode)) {
|
||||||
/* Dump error to upper layer */
|
/* Dump error to upper layer */
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
MM_CORE_ERROR,
|
MM_CORE_ERROR,
|
||||||
|
Reference in New Issue
Block a user