Squelch some Visual Studio Code Analyzer warnings in Flex-generated scanners.

Hopefully this filters out stuff about which we can't do very much
(other than send off a Flex fix and wait for it to be accepted and end
up in a WinFlexBison package), making it easier to find the stuff about
which we *can* directly do something (i.e., problems in code *we* wrote).

Change-Id: I9dec0389c3e126697acb307d30a823b9b285ef45
Reviewed-on: https://code.wireshark.org/review/26164
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-02-27 20:12:53 -08:00
parent d4ef22db8f
commit 48a4ed1058
1 changed files with 14 additions and 1 deletions

View File

@ -106,12 +106,25 @@ extern "C" {
* warning C4018: signed/unsigned mismatch
* warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data
* warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
*
* as well as Visual Studio Code Analyzer warnings:
*
* warning C6011: Dereferencing NULL pointer
* warning C6308: 'realloc' might return null pointer
* warning C6386: Buffer overrun
* warning C6387: 'XXX' could be '0'
* warning C28182: Dereferencing NULL pointer
*/
#define DIAG_OFF_FLEX \
__pragma(warning(push)) \
__pragma(warning(disable:4018)) \
__pragma(warning(disable:4244)) \
__pragma(warning(disable:4267))
__pragma(warning(disable:4267)) \
__pragma(warning(disable:6011)) \
__pragma(warning(disable:6308)) \
__pragma(warning(disable:6386)) \
__pragma(warning(disable:6387)) \
__pragma(warning(disable:28182))
#define DIAG_ON_FLEX __pragma(warning(pop))
/*