From: Mikael Pettersson <mikpe@user.it.uu.se>
To: linux-kernel@vger.kernel.org
Subject: [PATCH][2.6.11] drivers/net/arcnet/arcnet.c gcc4 fixes
Date: Tue, 15 Mar 2005 15:05:58 +0100 [thread overview]
Message-ID: <16950.60358.188803.1502@alkaid.it.uu.se> (raw)
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");
}
next reply other threads:[~2005-03-15 14:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-15 14:05 Mikael Pettersson [this message]
2005-03-22 22:52 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16950.60358.188803.1502@alkaid.it.uu.se \
--to=mikpe@user.it.uu.se \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®