Hi Martin,

>  src/call-forwarding.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/call-forwarding.c b/src/call-forwarding.c
> index 512f223..36ba4f1 100644
> --- a/src/call-forwarding.c
> +++ b/src/call-forwarding.c
> @@ -246,7 +246,7 @@ static gboolean is_cfu_enabled(struct 
> ofono_call_forwarding *cf,
>  static void sim_set_cf_indicator(struct ofono_call_forwarding *cf)
>  {
>       gboolean cfu_voice;
> -     struct ofono_call_forwarding_condition *cond;
> +     struct ofono_call_forwarding_condition *cond = NULL;
>  
>       cfu_voice = is_cfu_enabled(cf, &cond);

I really hate trying to fix compiler warnings like this.

        /*
         * For now we only support Voice, although Fax & all Data
         * basic services are applicable as well.
         */
        for (; l; l = l->next) {
                cond = l->data;

                if (cond->cls > BEARER_CLASS_VOICE)
                        continue;

                if (out)
                        *out = cond;

                return TRUE;
        }

        return FALSE;

So this is clearly a false positive. The only why this would fail is
when l->data is NULL, but even then cond is initialized properly.

Regards

Marcel


_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to