From f51bad11d70b2548ed2cbf117b90bd9dbf1afedf Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 4 Dec 2015 19:52:51 -0800 Subject: 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 --- ui/text_import_scanner.l | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'ui') diff --git a/ui/text_import_scanner.l b/ui/text_import_scanner.l index 625cc050d1..23e6d24adb 100644 --- a/ui/text_import_scanner.l +++ b/ui/text_import_scanner.l @@ -10,6 +10,11 @@ */ %option never-interactive +/* + * We want to stop processing when we get to the end of the input. + */ +%option noyywrap + /* * Prefix scanner routines with "text_import" rather than "yy", so this scanner * can coexist with other scanners. @@ -92,9 +97,3 @@ eol \r?\n\r? {text} { parse_token(T_TEXT, yytext); } <> { write_current_packet(); yyterminate(); } - -%% -int yywrap(void) -{ - return 1; -} -- cgit v1.2.1