Wireshark-dev: Re: [Wireshark-dev] Has commit 37468 (ieee80211 uat) ever been compile tested???
From: Anders Broman <a.broman@xxxxxxxxxxxx>
Date: Tue, 31 May 2011 00:08:54 +0200
Joerg Mayer skrev 2011-05-30 23:33:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c: In function ‘try_decrypt_wep’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15542:19: error: ‘num_wepkeys’ undeclared (first use in this function)
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15542:19: note: each undeclared identifier is reported only once for each function it appears in
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c: In function ‘wep_decrypt’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15675:31: error: ‘num_wepkeys’ undeclared (first use in this function)
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c: In function ‘init_wepkeys’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15756:8: error: ‘i’ undeclared (first use in this function)
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15756:15: error: ‘keyidx’ undeclared (first use in this function)
cc1: warnings being treated as errors
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15756:13: error: left-hand operand of comma expression has no effect
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15797:1: error: invalid storage class for function ‘weak_iv’
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15796:1: error: ISO C90 forbids mixed declarations and code
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15819:1: error: expected declaration or statement at end of input
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:15747:12: error: unused variable ‘res’
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c: At top level:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-ieee80211.c:280:12: error: ‘weak_iv’ used but never defined
make[2]: *** [epan/CMakeFiles/epan.dir/dissectors/packet-ieee80211.c.o] Error 1

Hi,
Looking into the first problem
.c:15542:19: error: ‘num_wepkeys’ undeclared (first use in this function) It only happens inside of #ifdef HAVE_AIRPDCAP which is defined on Windows and all the buildbots hence no one discovered the problem until now. I suspect the other problems are similar.
I'm not sure if Guys comment in the bug
"The decryption code should be supported on all platforms;" implies that we could get rid of that #ifdef
Perhaps Cmake needs to check for the availability of AIRPDCAP.
Regards
Anders