Wireshark mailing list archives
Re: [Wireshark-commits] rev 33587: /trunk/ /trunk/epan/dissectors/: packet-mac-lte.c /trunk/gtk/: compare_stat.c /trunk/: tap-comparestat.c
From: Joerg Mayer <jmayer () loplof de>
Date: Tue, 20 Jul 2010 14:58:58 +0200
On Tue, Jul 20, 2010 at 02:47:13AM -0700, Guy Harris wrote:
On Jul 20, 2010, at 1:27 AM, jmayer () wireshark org wrote:http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=33587 User: jmayer Date: 2010/07/20 01:27 AM Log: Updading opensuse 11.2 -> 11.3 updated gcc to 4.5.0, which created a few warnings that needed fixing when compiling with -Werror.Is this a bug in GCC 4.5.0, or did I miss something in my reading of the ANSI C standard? Shouldn't declaring the variables in question as "volatile" be sufficient to keep the compiler from whining about them being trashed by longjmp?
I do not have enough knowledge about C to answer that. I've just recreated the problem to paste the warning (turned error) for the first instance, where the code was commented out before my patch: cc1: warnings being treated as errors /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-mac-lte.c: In function âdissect_bch.clone.2â: /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-mac-lte.c:1355:28: error: variable âprotocol_handleâ might be clobbered by âlongjmpâ or âvforkâ make[1]: *** [epan/CMakeFiles/epan.dir/dissectors/packet-mac-lte.c.o] Error 1 make[1]: Leaving directory `/home/jmayer/work/wireshark/svn/build' make: *** [dissectors/packet-mac-lte.c.o] Error 2 make: Leaving directory `/home/jmayer/work/wireshark/svn/build/epan' and that's the code starting on line 1366: #if 1 TRY { call_dissector_only(protocol_handle, rrc_tvb, pinfo, tree); } CATCH_ALL { } ENDTRY #else call_with_catch_all(protocol_handle, rrc_tvb, pinfo, tree); #endif It obviously worked in the past, but with the release of a first(?) gcc 4.5.0 distro I thought that getting WS to compile was a priority. Ciao Joerg -- Joerg Mayer <jmayer () loplof de> We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: [Wireshark-commits] rev 33587: /trunk/ /trunk/epan/dissectors/: packet-mac-lte.c /trunk/gtk/: compare_stat.c /trunk/: tap-comparestat.c Guy Harris (Jul 20)
- Re: [Wireshark-commits] rev 33587: /trunk/ /trunk/epan/dissectors/: packet-mac-lte.c /trunk/gtk/: compare_stat.c /trunk/: tap-comparestat.c Joerg Mayer (Jul 20)