aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/ascend_scanner.l12
-rw-r--r--wiretap/k12text.l10
2 files changed, 19 insertions, 3 deletions
diff --git a/wiretap/ascend_scanner.l b/wiretap/ascend_scanner.l
index 0fb90184da..133f0dfc5a 100644
--- a/wiretap/ascend_scanner.l
+++ b/wiretap/ascend_scanner.l
@@ -65,7 +65,10 @@
#include "ascend.h"
#include "file_wrappers.h"
-DIAG_OFF(sign-compare)
+/*
+ * Disable diagnostics in the code generated by Flex.
+ */
+DIAG_OFF_FLEX
#define YY_INPUT(buf,result,max_size) { \
ascend_state_t *parser_state = ascendget_extra(yyscanner); \
@@ -372,3 +375,10 @@ task:|task|at|time:|octets { return KEYWORD; }
<<EOF>> { yyterminate(); }
(.|\n) ;
+
+%%
+
+/*
+ * Turn diagnostics back on, so we check the code that we've written.
+ */
+DIAG_ON_FLEX
diff --git a/wiretap/k12text.l b/wiretap/k12text.l
index 5451b5eff8..be5d51379f 100644
--- a/wiretap/k12text.l
+++ b/wiretap/k12text.l
@@ -101,7 +101,10 @@
#define YY_NO_UNISTD_H
#endif
-DIAG_OFF(sign-compare)
+/*
+ * Disable diagnostics in the code generated by Flex.
+ */
+DIAG_OFF_FLEX
/*
* State kept by the scanner.
@@ -233,7 +236,10 @@ hdlc HDLC
%%
-DIAG_ON(sign-compare)
+/*
+ * Turn diagnostics back on, so we check the code that we've written.
+ */
+DIAG_ON_FLEX
/* Fill in pkthdr */