[PATCH 1/2] Fix use of uninitialized variable

Denis Kenzior denkenz at gmail.com
Tue Feb 2 14:33:07 PST 2010


Hi Gustavo,

> ---
>  gatchat/gatchat.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
> index e25bfd6..5b0851b 100644
> --- a/gatchat/gatchat.c
> +++ b/gatchat/gatchat.c
> @@ -692,7 +692,7 @@ static gboolean received_data(GIOChannel *channel,
>  GIOCondition cond, unsigned char *buf;
>  	GAtChat *chat = data;
>  	GIOError err;
> -	gsize rbytes;
> +	gsize rbytes = 0;
>  	gsize toread;
>  	gsize total_read = 0;
>  	guint read_count = 0;
> 

I'm convinced that this is a false positive.  The read_count keeps rbytes from 
ever being referenced when undefined.

Regards,
-Denis


More information about the ofono mailing list