b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] b43: Fix bogus compilation warning for phy_n
@ 2011-05-19 21:35 Larry Finger
  2011-05-19 21:43 ` Rafał Miłecki
  0 siblings, 1 reply; 7+ messages in thread
From: Larry Finger @ 2011-05-19 21:35 UTC (permalink / raw)
  To: zajec5, John W Linville; +Cc: b43-dev, linux-wireless

When cross-compiling the 2.6.39 wireless-testing source using GCC version
(SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291] on an x86_64 system,
the following warning is issued:

  CC [M]  drivers/net/wireless/b43/phy_n.o
drivers/net/wireless/b43/phy_n.c: In function ?b43_nphy_cal_tx_iq_lo?:
drivers/net/wireless/b43/phy_n.c:3096: warning: ?last? may be used
        uninitialized in this function

A quick look at the code shows that the warning is bogus and a gcc bug,
but to ensure clean compilation for all users, mark the offending variable
as uninitialized.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

Index: wireless-testing-new/drivers/net/wireless/b43/phy_n.c
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/b43/phy_n.c
+++ wireless-testing-new/drivers/net/wireless/b43/phy_n.c
@@ -3093,7 +3093,7 @@ static int b43_nphy_cal_tx_iq_lo(struct
 	int freq;
 	bool avoid = false;
 	u8 length;
-	u16 tmp, core, type, count, max, numb, last, cmd;
+	u16 tmp, core, type, count, max, numb, uninitialized_var(last), cmd;
 	const u16 *table;
 	bool phy6or5x;
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-19 23:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-19 21:35 [PATCH] b43: Fix bogus compilation warning for phy_n Larry Finger
2011-05-19 21:43 ` Rafał Miłecki
2011-05-19 22:12   ` Larry Finger
2011-05-19 22:40     ` Rafał Miłecki
2011-05-19 22:48       ` Larry Finger
2011-05-19 22:59         ` Rafał Miłecki
2011-05-19 23:07           ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).