diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-04 19:52:51 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-05 08:06:50 +0000 |
commit | f51bad11d70b2548ed2cbf117b90bd9dbf1afedf (patch) | |
tree | 9db789d73c4958c3a792c6b10abcbb746318bcd8 /wiretap/ascend_scanner.l | |
parent | 42333aa353515ccbb68c6e74109cd34a34d1abe6 (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 'wiretap/ascend_scanner.l')
-rw-r--r-- | wiretap/ascend_scanner.l | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/wiretap/ascend_scanner.l b/wiretap/ascend_scanner.l index ff8b0a1ec8..b7df4cb76a 100644 --- a/wiretap/ascend_scanner.l +++ b/wiretap/ascend_scanner.l @@ -4,6 +4,11 @@ %option never-interactive /* + * We want to stop processing when we get to the end of the input. + */ +%option noyywrap + +/* * Prefix scanner routines with "ascend" rather than "yy", so this scanner * can coexist with other scanners. */ @@ -339,14 +344,3 @@ void ascend_init_lexer(FILE_T fh) yy_fh = fh; BEGIN(INITIAL); } - -/* - * 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; -} |