lkml.org 
[lkml]   [2005]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH][2.6.11] drivers/net/arcnet/arcnet.c gcc4 fixes
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.119 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site