Skip to contentSkip to conversation

wireless:hostap_main.c warning: variable 'iface' set but not used

PATCH In review Justin P. Mattock 2 participants 3 messages Jun 21, 2010 – Jun 22, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/5 wireless:hostap_main.c warning: variable 'iface' set but not used

This is a resend from version one due to trying a different approach than the original(probably important to leave netdev_priv() in).

In any case have a look, if there's another approach let me know and ill test it out. The below patch fixes a warning im seeing when compiling with gcc 4.6.0

CC [M] drivers/net/wireless/hostap/hostap_main.o drivers/net/wireless/hostap/hostap_main.c: In function 'hostap_set_multicast_list_queue':
drivers/net/wireless/hostap/hostap_main.c:744:27: warning: variable 'iface' set but not used

---
 drivers/net/wireless/hostap/hostap_main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/wireless/hostap/hostap_main.c +1 -2
index eb57d1e..a866e7a 100644
@@ -741,9 +741,8 @@ void hostap_set_multicast_list_queue(struct work_struct *work)
 	local_info_t *local =
 		container_of(work, local_info_t, set_multicast_list_queue);
 	struct net_device *dev = local->dev;
-	struct hostap_interface *iface;
 
-	iface = netdev_priv(dev);
+	netdev_priv(dev);
 	if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE,
 			    local->is_promisc)) {
 		printk(KERN_INFO "%s: %sabling promiscuous mode failed\n",
Signature · 1 line
1.7.1.rc1.21.gf3bd6
#1 lore raw
Quoted 11 lines · Justin P. Mattock

This is a resend from version one due to trying a different approach than the original(probably important to leave netdev_priv() in).

In any case have a look, if there's another approach let me know and ill test it out. The below patch fixes a warning im seeing when compiling with gcc 4.6.0

CC [M] drivers/net/wireless/hostap/hostap_main.o drivers/net/wireless/hostap/hostap_main.c: In function 'hostap_set_multicast_list_queue':
drivers/net/wireless/hostap/hostap_main.c:744:27: warning: variable 'iface' set but not used

I already applied the other version to wireless-next-2.6. I can't imagine what you mean to accomplish by leaving in a call to netdev_priv w/o assigning the result to something.

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#2 lore raw
Quoted 13 lines · John W. Linville
Quoted 11 lines · Justin P. Mattock

This is a resend from version one due to trying a different approach than the original(probably important to leave netdev_priv() in).

In any case have a look, if there's another approach let me know and ill test it out. The below patch fixes a warning im seeing when compiling with gcc 4.6.0

CC [M] drivers/net/wireless/hostap/hostap_main.o drivers/net/wireless/hostap/hostap_main.c: In function 'hostap_set_multicast_list_queue':
drivers/net/wireless/hostap/hostap_main.c:744:27: warning: variable 'iface' set but not used

Quoted 5 lines

I already applied the other version to wireless-next-2.6. I can't imagine what you mean to accomplish by leaving in a call to netdev_priv w/o assigning the result to something.

John

alright..
as for the netdev_priv, I was getting confused on this one.

Thanks for taking the time to look at this.

Justin P. Mattock