From: Eric Sesterhenn Date: Sat, 19 Aug 2006 17:37:57 +0000 (+0200) Subject: [PATCH] Signedness issue in drivers/net/3c515.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cb958186ed543d1a4f074ceb1c783fe8b0908437;p=linux-beck.git [PATCH] Signedness issue in drivers/net/3c515.c while playing with gcc 4.1 -Wextra warnings, I came across this one: drivers/net/3c515.c:1027: warning: comparison of unsigned expression >= 0 is always true Since i is unsigned the >= 0 check in the for loop is always true, so we might spin there forever unless the if condition triggers. Since i is only used in this loop, this patch changes it to an integer. Signed-off-by: Eric Sesterhenn Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 4532b17e40ea..aedfddf20cb3 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c @@ -1003,7 +1003,8 @@ static int corkscrew_start_xmit(struct sk_buff *skb, /* Calculate the next Tx descriptor entry. */ int entry = vp->cur_tx % TX_RING_SIZE; struct boom_tx_desc *prev_entry; - unsigned long flags, i; + unsigned long flags; + int i; if (vp->tx_full) /* No room to transmit with */ return 1;