From 72b57ac4ef653c1909e4c1d1daf40de2357b77e8 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 16 Feb 2018 03:15:32 -0800 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- text2pcap-scanner.l | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'text2pcap-scanner.l') diff --git a/text2pcap-scanner.l b/text2pcap-scanner.l index b4024b162d..c233999d4d 100644 --- a/text2pcap-scanner.l +++ b/text2pcap-scanner.l @@ -106,3 +106,10 @@ eol \r?\n\r? if (parse_token(T_EOL, NULL) != EXIT_SUCCESS) return EXIT_FAILURE; } {comment} { if (parse_token(T_EOL, NULL) != EXIT_SUCCESS) return EXIT_FAILURE; } {text} { if (parse_token(T_TEXT, yytext) != EXIT_SUCCESS) return EXIT_FAILURE; } + +%% + +/* + * Turn diagnostics back on, so we check the code that we've written. + */ +DIAG_ON_FLEX -- cgit v1.2.3