Wireshark mailing list archives
volatile
From: Chris Maynard <chris.maynard () gtech com>
Date: Wed, 20 Apr 2011 14:15:19 +0000 (UTC)
Coverity CID 322 is an "assert with side effect" warning in
/epan/dissectors/packet-x11.c:dissect_x11_replies(). While it would be easy to
eliminate this warning by assigning 'plen' to a temporary variable and then
using that in the DISSECTOR_ASSERT() macro instead of 'plen', I found myself
asking why 'plen' is declared as a volatile int to begin with. It seems like
the better solution would just be to eliminate the volatile keyword.
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?
___________________________________________________________________________
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:
- volatile Chris Maynard (Apr 20)
- Re: volatile Stephen Fisher (Apr 20)
- Re: volatile Guy Harris (Apr 20)
