diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-02-16 03:15:32 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-02-16 19:54:16 +0000 |
commit | 72b57ac4ef653c1909e4c1d1daf40de2357b77e8 (patch) | |
tree | 991ac5b78097abb80d1b83272fc247e601e0edf4 /plugins | |
parent | 09671923adcb745381fc4b276085d0ac7cb8ee94 (diff) |
Use DIAG_OFF_FLEX/DIAG_ON_FLEX more consistently.
Add warning C4267 (size_t to int conversion) with MSVC to DIAG_OFF_FLEX.
Addd -Wshorten-64-to-32 with Clang and GCC to DIAG_OFF_FLEX.
Don't explicitly use #pragma to turn off warnings; use DIAG_OFF_FLEX for
all of them.
If we use DIAG_OFF_FLEX, use DIAG_ON_FLEX, even if we have no section of
entirely included code at the end.
Change-Id: Ibfd44e8954704e9a8bcb1bd8e54f31d28357fffb
Reviewed-on: https://code.wireshark.org/review/25817
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/epan/wimaxasncp/wimaxasncp_dict.l | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/plugins/epan/wimaxasncp/wimaxasncp_dict.l b/plugins/epan/wimaxasncp/wimaxasncp_dict.l index dab2836a93..3dc4dbf887 100644 --- a/plugins/epan/wimaxasncp/wimaxasncp_dict.l +++ b/plugins/epan/wimaxasncp/wimaxasncp_dict.l @@ -1,12 +1,6 @@ %top { /* Include this before everything else, for various large-file definitions */ #include "config.h" - -// warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4267) -#endif } /* @@ -106,7 +100,10 @@ #include "wimaxasncp_dict.h" -DIAG_OFF(sign-compare) +/* + * Disable diagnostics in the code generated by Flex. + */ +DIAG_OFF_FLEX typedef struct entity_t { gchar *name; @@ -514,14 +511,12 @@ since_attr since=\042 <OUTSIDE>. ; - - - - - %% -DIAG_ON(sign-compare) +/* + * Turn diagnostics back on, so we check the code that we've written. + */ +DIAG_ON_FLEX static int debugging = 0; |