[PATCH][2.6.11] drivers/net/depca.c gcc4 fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix

drivers/net/depca.c: In function 'load_packet':
drivers/net/depca.c:1829: warning: operation on 'i' may be undefined

warning from gcc4 in depca.c.

/Mikael

--- linux-2.6.11/drivers/net/depca.c.~1~	2005-03-02 19:24:16.000000000 +0100
+++ linux-2.6.11/drivers/net/depca.c	2005-03-15 14:36:49.000000000 +0100
@@ -1826,7 +1826,7 @@ static int load_packet(struct net_device
 
 		/* set up the buffer descriptors */
 		len = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;
-		for (i = entry; i != end; i = (++i) & lp->txRingMask) {
+		for (i = entry; i != end; i = (i+1) & lp->txRingMask) {
 			/* clean out flags */
 			writel(readl(&lp->tx_ring[i].base) & ~T_FLAGS, &lp->tx_ring[i].base);
 			writew(0x0000, &lp->tx_ring[i].misc);	/* clears other error flags */
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux