[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140814.143107.519984079758340157.davem@redhat.com>
Date: Thu, 14 Aug 2014 14:31:07 -0700 (PDT)
From: David Miller <davem@...hat.com>
To: harish.patil@...gic.com
Cc: netdev@...r.kernel.org, Dept-GELinuxNICDev@...gic.com,
sudarsana.kalluru@...gic.com
Subject: Re: [PATCH net-next 1/2] qlge: Fix compilation warning
From: Harish Patil <harish.patil@...gic.com>
Date: Wed, 13 Aug 2014 14:08:08 -0400
> From: Harish Patil <harish.patil@...gic.com>
>
> Fix the below warning message observed during qlge compilation:
> qlge_main.c:1754: warning: 'lbq_desc' may be used uninitialized in this function
>
> Signed-off-by: Harish Patil <harish.patil@...gic.com>
Please fix this differently. The problem is that the compiler can't see that
you've done the !length check at the top of the function, so when it later
sees the while (length > 0) loop, it doesn't know that this loop will always
execute at least once.
Just change that loop to a do { } while() loop and the compiler will be able
to see everything.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists