On 06/05/13 09:24, Ben Chan wrote:
> This patch removes an unnecessary check of unsigned expression >= 0,
> which also fixes the following clang warnings:
>
> sierra/mm-broadband-modem-sierra.c:570:18: error: comparison of
> unsigned expression >= 0 is always true
> [-Werror,-Wtautological-compare]
> mode >= 0 &&
> ~~~~ ^ ~
>
> Bug reported on https://code.google.com/p/chromium/issues/detail?id=235989
> Patched by Yunlian Jiang <[email protected]>
Pushed now, thanks.
> ---
> plugins/sierra/mm-broadband-modem-sierra.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/plugins/sierra/mm-broadband-modem-sierra.c
> b/plugins/sierra/mm-broadband-modem-sierra.c
> index 7cb8e6c..f8cfb74 100644
> --- a/plugins/sierra/mm-broadband-modem-sierra.c
> +++ b/plugins/sierra/mm-broadband-modem-sierra.c
> @@ -566,9 +566,7 @@ selrat_query_ready (MMBaseModem *self,
> if (g_regex_match_full (r, response, strlen (response), 0, 0,
> &match_info, &error)) {
> guint mode;
>
> - if (mm_get_uint_from_match_info (match_info, 1, &mode) &&
> - mode >= 0 &&
> - mode <= 7) {
> + if (mm_get_uint_from_match_info (match_info, 1, &mode) && mode <= 7)
> {
> switch (mode) {
> case 0:
> result.allowed = MM_MODEM_MODE_ANY;
>
--
Aleksander
_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list