* [PATCH]: Fix niu warning...
@ 2009-04-08 22:53 David Miller
0 siblings, 0 replies; only message in thread
From: David Miller @ 2009-04-08 22:53 UTC (permalink / raw)
To: netdev
For a while GCC has been emitting driver/net/niu.c:4937
'val' may be use uninitialized in this function
I finally got fed up enough with it to commit the following.
niu: Fix unused variable warning.
Don't strain gcc's tiny mind.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/niu.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 2cd6109..2b17453 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -4834,6 +4834,7 @@ static int niu_compute_rbr_cfig_b(struct rx_ring_info *rp, u64 *ret)
{
u64 val = 0;
+ *ret = 0;
switch (rp->rbr_block_size) {
case 4 * 1024:
val |= (RBR_BLKSIZE_4K << RBR_CFIG_B_BLKSIZE_SHIFT);
--
1.6.2.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-08 22:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08 22:53 [PATCH]: Fix niu warning David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).