ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] volatile

From: Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Apr 2011 09:17:39 -0600
On Wed, Apr 20, 2011 at 02:15:19PM +0000, Chris Maynard wrote:

> But then I went looking for other volatile's and found a number of 
> them:
> 
> grep volatile epan/dissectors/packet-*.c | wc
>     184    1066   14209
> 
> Do we really need any of these in Wireshark?

I just tried removing the one you mentioned and another random one and 
it still compiles, but I've often seen a compiler warning about a 
longjump because of our exception handling code (the TRY / CATCH stuff) 
clobbering variables requiring them to be declared as volatile.