New wireless-testing has grown some warnings -- please fix ASAP!
commit befdbc51cc69c01cd412ad2429960b9c3042f97c is the current wireless-testing head.
This iteration of wireless-testing seems to have grown some warnings. Some of them come from a new __must_check annotation of cfg80211_inform_bss, while others are simply unused or uninitialized variables. In any case, I would prefer not to see them.
Please check the wireless-testing build and attempt to squash any warnings that can be reasonably squashed. Those who do not do so will be subject to irritated sighs over IRC, drunken emails about my new DVD rental service, and accusations of making unwanted sexual advances toward me. You've been warned.
John
---
CC [M] net/wireless/nl80211.onet/wireless/nl80211.c: In function ‘nl80211_tx_mgmt’:net/wireless/nl80211.c:5286:8: warning: ‘hdr’ may be used uninitialized in this function
CC [M] drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.odrivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c: In function ‘wl_inform_ibss’:drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:2152:21: warning: ignoring return value of ‘cfg80211_inform_bss’, declared with attribute warn_unused_result
CC [M] drivers/net/wireless/libertas/cfg.odrivers/net/wireless/libertas/cfg.c: In function ‘lbs_ret_scan’:drivers/net/wireless/libertas/cfg.c:636:24: warning: ignoring return value of ‘cfg80211_inform_bss’, declared with attribute warn_unused_result drivers/net/wireless/libertas/cfg.c: In function ‘lbs_join_post’:drivers/net/wireless/libertas/cfg.c:1766:21: warning: ignoring return value of ‘cfg80211_inform_bss’, declared with attribute warn_unused_result
CC [M] drivers/net/wireless/mwifiex/cfg80211.odrivers/net/wireless/mwifiex/cfg80211.c: In function ‘mwifiex_cfg80211_inform_ibss_bss’:drivers/net/wireless/mwifiex/cfg80211.c:803:21: warning: ignoring return value of ‘cfg80211_inform_bss’, declared with attribute warn_unused_result
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Johannes Berg
maintainerQuoted 3 lines · John W. Linville
CC [M]
net/wireless/nl80211.onet/wireless/nl80211.c: In function ‘nl80211_tx_mgmt’:net/wireless/nl80211.c:5286:8: warning: ‘hdr’ may be used uninitialized in this function
Hm, my compiler is smarter than yours ;-)
Not quite sure how to fix this best, I'll figure out something. Thanks for the heads-up.
johannes
SGkgSm9obiwNCg0KPiAgIENDIFtNXSAgZHJpdmVycy9uZXQvd2lyZWxlc3MvbXdpZmlleC9jZmc4 MDIxMS5vDQo+IGRyaXZlcnMvbmV0L3dpcmVsZXNzL213aWZpZXgvY2ZnODAyMTEuYzogSW4gZnVu Y3Rpb24g4oCYbXdpZmlleF9jZmc4MDIxMV9pbmZvcm1faWJzc19ic3PigJk6DQo+IGRyaXZlcnMv bmV0L3dpcmVsZXNzL213aWZpZXgvY2ZnODAyMTEuYzo4MDM6MjE6IHdhcm5pbmc6IGlnbm9yaW5n IHJldHVybiB2YWx1ZSBvZg0KPiDigJhjZmc4MDIxMV9pbmZvcm1fYnNz4oCZLCBkZWNsYXJlZCB3 aXRoIGF0dHJpYnV0ZSB3YXJuX3VudXNlZF9yZXN1bHQNCg0KVGhlIFtQQVRDSCA3LzddIEkgc2Vu dCB5ZXN0ZXJkYXkgKGNvcGllZCAmIHBhc3RlZCBiZWxvdykgZml4ZWQgdGhlIHdhcm5pbmcgaW4g bXdpZmlleC4NCg0KVGhhbmtzLA0KQmluZw0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0K RnJvbTogQmluZyBaaGFvIFttYWlsdG86YnpoYW9AbWFydmVsbC5jb21dIA0KU2VudDogTW9uZGF5 LCBOb3ZlbWJlciAwNywgMjAxMSA5OjQxIFBNDQpUbzogbGludXgtd2lyZWxlc3NAdmdlci5rZXJu ZWwub3JnDQpDYzogSm9obiBXLiBMaW52aWxsZTsgQW1pdGt1bWFyIEthcndhcjsgS2lyYW4gRGl2 ZWthcjsgWW9nZXNoIFBvd2FyOyBGcmFuayBIdWFuZzsgQmluZyBaaGFvOyBKb2hhbm5lcyBCZXJn DQpTdWJqZWN0OiBbUEFUQ0ggNy83XSBtd2lmaWV4OiByZWxlYXNlIGJzcyBzdHJ1Y3R1c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9idWYs IGllX2xlbiwgMCwgR0ZQX0tFUk5FTCk7DQorCWNmZzgwMjExX3B1dF9ic3MoYnNzKTsNCiAJbWVt Y3B5KHByaXYtPmNmZ19ic3NpZCwgYnNzX2luZm8uYnNzaWQsIEVUSF9BTEVOKTsNCiANCiAJcmV0 dXJuIDA7DQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvd2lyZWxlc3MvbXdpZmlleC9zY2FuLmMg Yi9kcml2ZXJzL25ldC93aXJlbGVzcy9td2lmaWV4L3NjYW4uYw0KaW5kZXggYzY1MGU2MC4uOGEx OGJjYyAxMDA2NDQNCi0tLSBhL2RyaXZlcnMvbmV0L3dpcmVsZXNzL213aWZpZXgvc2Nhbi5jDQor KysgYi9kcml2ZXJzL25ldC93aXJlbGVzcy9td2lmaWV4L3NjYW4uYw0KQEAgLTE3NjAsNiArMTc2 MCw3IEBAIGludCBtd2lmaWV4X3JldF84MDJfMTFfc2NhbihzdHJ1Y3QgbXdpZmlleF9wcml2YXRl ICpwcml2LA0KIAkJCQkJICAgICAgY2FwX2luZm9fYml0bWFwLCBiZWFjb25fcGVyaW9kLA0KIAkJ CQkJICAgICAgaWVfYnVmLCBpZV9sZW4sIHJzc2ksIEdGUF9LRVJORUwpOw0KIAkJCQkqKHU4ICop YnNzLT5wcml2ID0gYmFuZDsNCisJCQkJY2ZnODAyMTFfcHV0X2Jzcyhic3MpOw0KIA0KIAkJCQlp ZiAocHJpdi0+bWVkaWFfY29ubmVjdGVkICYmICFtZW1jbXAoYnNzaWQsDQogCQkJCQlwcml2LT5j dXJyX2Jzc19wYXJhbXMuYnNzX2Rlc2NyaXB0b3INCi0tIA0KMS43LjAuMg0K
Quoted 8 lines · John W. Linville
commit
befdbc51cc69c01cd412ad2429960b9c3042f97cis the current wireless-testing head.This iteration of wireless-testing seems to have grown some warnings. Some of them come from a new
__must_checkannotation ofcfg80211_inform_bss, while others are simply unused or uninitialized variables. In any case, I would prefer not to see them.
Quoted 7 lines
Please check the wireless-testing build and attempt to squash any warnings that can be reasonably squashed. Those who do not do so will be subject to irritated sighs over IRC, drunken emails about my new DVD rental service, and accusations of making unwanted sexual advances toward me. You've been warned.
John
For the record, what compiler are you using?
Larry
Johannes Berg
maintainerPATCH 1/1 nl80211: fix compiler warning
In reply to John W. LinvilleFrom: Johannes Berg <[email protected]>
John reported the following warning:
net/wireless/nl80211.c: In function ‘nl80211_tx_mgmt’:net/wireless/nl80211.c:5286:8: warning: ‘hdr’ may be used uninitialized in this function
Evidently, his version of gcc isn't able to see that when "msg" is initialized, "hdr" must also be. My gcc, 4.6.1, can actually see that and doesn't warn. Simply initialize the variable to NULL. That means if the compiler was ever right we'll crash though so isn't really optimal since it may hide warnings from the compiler when somebody modifies this code in the future.
--- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/nl80211.c +1 -1
@@ -5283,7 +5283,7 @@ static int nl80211_tx_mgmt(struct sk_bufbool channel_type_valid = false;u32 freq;int err; -void *hdr; +void *hdr =NULL ;u64 cookie;struct sk_buff *msg =NULL ;unsigned int wait =0 ;
Quoted 15 lines · Larry Finger
Quoted 14 lines · John W. Linville
commit
befdbc51cc69c01cd412ad2429960b9c3042f97cis the current wireless-testing head.This iteration of wireless-testing seems to have grown some warnings. Some of them come from a new
__must_checkannotation ofcfg80211_inform_bss, while others are simply unused or uninitialized variables. In any case, I would prefer not to see them.Please check the wireless-testing build and attempt to squash any warnings that can be reasonably squashed. Those who do not do so will be subject to irritated sighs over IRC, drunken emails about my new DVD rental service, and accusations of making unwanted sexual advances toward me. You've been warned.
Quoted 3 lines
Quoted 1 line
John
For the record, what compiler are you using?
[linville-8530p.local]:> gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.5.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix
gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.