Skip to contentSkip to conversation

: Fix niu warning...

PATCH New David Miller 1 participant 1 message Apr 8, 2009

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/1 : Fix niu warning...

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.

---
 drivers/net/niu.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/niu.c +1 -0
index 2cd6109..2b17453 100644
@@ -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);
Signature · 1 line
1.6.2.2