From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "Ira W. Snyder" <iws@ovro.caltech.edu>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Janz ICAN3 build warnings
Date: Wed, 29 Jan 2014 15:10:51 +0100 [thread overview]
Message-ID: <52E90BEB.9040608@hartkopp.net> (raw)
Hello Ira,
while addressing an issue with the skb->sk handling here
http://marc.info/?l=linux-netdev&m=139100313304453&w=2
I was enabling the Janz ICAN3 driver to be built as I did a small change
there too.
Can you please fix these build warnings below?
Regards,
Oliver
CC [M] drivers/net/can/janz-ican3.o
drivers/net/can/janz-ican3.c:1086:43: warning: ‘msg.data[6]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
mod->termination_enabled = msg->data[6] & HWCONF_TERMINATE_ON;
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘msg.data[6]’ was declared here
struct ican3_msg msg;
^
drivers/net/can/janz-ican3.c:1067:15: warning: ‘msg.data[5]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cf->data[6] = txerr;
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘msg.data[5]’ was declared here
struct ican3_msg msg;
^
drivers/net/can/janz-ican3.c:1068:15: warning: ‘msg.data[4]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cf->data[7] = rxerr;
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘msg.data[4]’ was declared here
struct ican3_msg msg;
^
drivers/net/can/janz-ican3.c:1014:21: warning: ‘msg.data[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
} else if (status & SR_ES) {
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘msg.data[3]’ was declared here
struct ican3_msg msg;
^
drivers/net/can/janz-ican3.c:1045:13: warning: ‘msg.data[2]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!(ecc & ECC_DIR))
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘msg.data[2]’ was declared here
struct ican3_msg msg;
^
drivers/net/can/janz-ican3.c:940:5: warning: ‘msg.data[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (msg->data[1] != CEVTIND_CHIP_SJA1000) {
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘msg.data[1]’ was declared here
struct ican3_msg msg;
^
drivers/net/can/janz-ican3.c:1025:5: warning: ‘*((void *)&msg+4)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (isrc == CEVTIND_BEI) {
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘*((void *)&msg+4)’ was declared here
struct ican3_msg msg;
^
drivers/net/can/janz-ican3.c:1098:10: warning: ‘msg.len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
dev_warn(mod->dev, "received unknown message: spec 0x%.2x length %d\n",
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘msg.len’ was declared here
struct ican3_msg msg;
^
drivers/net/can/janz-ican3.c:900:5: warning: ‘msg.spec’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (msg->spec == MSG_MSGLOST) {
^
drivers/net/can/janz-ican3.c:1320:20: note: ‘msg.spec’ was declared here
struct ican3_msg msg;
^
next reply other threads:[~2014-01-29 14:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 14:10 Oliver Hartkopp [this message]
2014-01-29 17:58 ` Janz ICAN3 build warnings Ira W. Snyder
2014-01-29 19:14 ` Oliver Hartkopp
2014-01-29 20:30 ` Marc Kleine-Budde
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=52E90BEB.9040608@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=iws@ovro.caltech.edu \
--cc=linux-can@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.