Netdev List
 help / color / mirror / Atom feed
From: Fugang Duan <B38611@freescale.com>
To: <b20596@freescale.com>, <b45643@freescale.com>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <shawn.guo@linaro.org>,
	<bhutchings@solarflare.com>, <R49496@freescale.com>,
	<stephen@networkplumber.org>
Subject: [PATCH] net: fec: fix build warning of used uninitialized variable
Date: Thu, 22 Aug 2013 18:00:37 +0800	[thread overview]
Message-ID: <1377165637-8116-1-git-send-email-B38611@freescale.com> (raw)

drivers/net/ethernet/freescale/fec_main.c:838
warning: 'vlan_tag' may be used uninitialized in this function
note: 'vlan_tag' was declared here

Compiler with the warning option: -Wuninitialized, the warning
will be reported.

Signed-off-by: Fugang Duan  <B38611@freescale.com>
---
 drivers/net/ethernet/freescale/fec_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 77ea0db..4ea1555 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -835,7 +835,7 @@ fec_enet_rx(struct net_device *ndev, int budget)
 	int	pkt_received = 0;
 	struct	bufdesc_ex *ebdp = NULL;
 	bool	vlan_packet_rcvd = false;
-	u16	vlan_tag;
+	u16	vlan_tag = 0;
 
 #ifdef CONFIG_M532x
 	flush_cache_all();
-- 
1.7.1

             reply	other threads:[~2013-08-22 10:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 10:00 Fugang Duan [this message]
2013-08-22 14:15 ` [PATCH] net: fec: fix build warning of used uninitialized variable Li Frank-B20596
2013-08-30  2:47   ` Duan Fugang-B38611
2013-09-10  1:48   ` Duan Fugang-B38611

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=1377165637-8116-1-git-send-email-B38611@freescale.com \
    --to=b38611@freescale.com \
    --cc=R49496@freescale.com \
    --cc=b20596@freescale.com \
    --cc=b45643@freescale.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=stephen@networkplumber.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