aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-12-04 19:52:51 -0800
committerGuy Harris <guy@alum.mit.edu>2015-12-05 08:06:50 +0000
commitf51bad11d70b2548ed2cbf117b90bd9dbf1afedf (patch)
tree9db789d73c4958c3a792c6b10abcbb746318bcd8 /plugins
parent42333aa353515ccbb68c6e74109cd34a34d1abe6 (diff)
Use noyywrap rather than defining our own yywrap functions.
Tweak lemonflex-tail.inc to fix an issue this reveals. It appears that, at least on the buildbots, the Visual Studio compiler no longer issues warnings for the code generated with %option noyywrap. Change-Id: Id64d56f1ae8a79d0336488a4a50518da1f511497 Reviewed-on: https://code.wireshark.org/review/12433 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mate/mate_parser.l16
-rw-r--r--plugins/wimaxasncp/wimaxasncp_dict.l16
2 files changed, 10 insertions, 22 deletions
diff --git a/plugins/mate/mate_parser.l b/plugins/mate/mate_parser.l
index a3f609e505..865b8d138c 100644
--- a/plugins/mate/mate_parser.l
+++ b/plugins/mate/mate_parser.l
@@ -14,6 +14,11 @@
%option never-interactive
/*
+ * We want to stop processing when we get to the end of the input.
+ */
+%option noyywrap
+
+/*
* Prefix scanner routines with "Mate" rather than "yy", so this scanner
* can coexist with other scanners.
*/
@@ -339,14 +344,3 @@ extern gboolean mate_load_config(const gchar* filename, mate_config* matecfg) {
return state;
}
-
-/*
- * We want to stop processing when we get to the end of the input.
- * (%option noyywrap is not used because if used then
- * some flex versions (eg: 2.5.35) generate code which causes
- * warnings by the Windows VC compiler).
- */
-
-int yywrap(void) {
- return 1;
-}
diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l
index 2c889b3a61..3953f1fe96 100644
--- a/plugins/wimaxasncp/wimaxasncp_dict.l
+++ b/plugins/wimaxasncp/wimaxasncp_dict.l
@@ -14,6 +14,11 @@
%option never-interactive
/*
+ * We want to stop processing when we get to the end of the input.
+ */
+%option noyywrap
+
+/*
* The language we're scanning is case-insensitive.
*/
%option caseless
@@ -727,17 +732,6 @@ void wimaxasncp_dict_print(FILE *fh, wimaxasncp_dict_t *d) {
}
}
-/*
- * We want to stop processing when we get to the end of the input.
- * (%option noyywrap is not used because if used then
- * some flex versions (eg: 2.5.35) generate code which causes
- * warnings by the Windows VC compiler).
- */
-
-int yywrap(void) {
- return 1;
-}
-
#ifdef TEST_WIMAXASNCP_DICT_STANDALONE
int main(int argc, char **argv) {
wimaxasncp_dict_t *d;