Fix

drivers/net/arcnet/arcnet.c: In function 'release_arcbuf':
drivers/net/arcnet/arcnet.c:256: warning: operation on 'i' may be undefined
drivers/net/arcnet/arcnet.c: In function 'get_arcbuf':
drivers/net/arcnet/arcnet.c:292: warning: operation on 'i' may be undefined

warnings from gcc4 in arcnet.c.

/Mikael

--- linux-2.6.11/drivers/net/arcnet/arcnet.c.~1~        2005-03-02 
19:24:16.000000000 +0100
+++ linux-2.6.11/drivers/net/arcnet/arcnet.c    2005-03-15 14:32:49.000000000 
+0100
@@ -253,7 +253,7 @@ static void release_arcbuf(struct net_de
        BUGLVL(D_DURING) {
                BUGMSG(D_DURING, "release_arcbuf: freed #%d; buffer queue is 
now: ",
                       bufnum);
-               for (i = lp->next_buf; i != lp->first_free_buf; i = ++i % 5)
+               for (i = lp->next_buf; i != lp->first_free_buf; i = (i+1) % 5)
                        BUGMSG2(D_DURING, "#%d ", lp->buf_queue[i]);
                BUGMSG2(D_DURING, "\n");
        }
@@ -289,7 +289,7 @@ static int get_arcbuf(struct net_device 
 
        BUGLVL(D_DURING) {
                BUGMSG(D_DURING, "get_arcbuf: got #%d; buffer queue is now: ", 
buf);
-               for (i = lp->next_buf; i != lp->first_free_buf; i = ++i % 5)
+               for (i = lp->next_buf; i != lp->first_free_buf; i = (i+1) % 5)
                        BUGMSG2(D_DURING, "#%d ", lp->buf_queue[i]);
                BUGMSG2(D_DURING, "\n");
        }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to