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>
This commit is contained in:
parent
42333aa353
commit
f51bad11d7
|
@ -19,6 +19,11 @@
|
|||
*/
|
||||
%option prefix="df_"
|
||||
|
||||
/*
|
||||
* We're reading from a string, so we don't need yywrap.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
%{
|
||||
/*
|
||||
* Wireshark - Network traffic analyzer
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
*/
|
||||
%option stack
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* Prefix scanner routines with "DiamDict" rather than "yy", so this scanner
|
||||
* can coexist with other scanners.
|
||||
|
@ -820,19 +825,6 @@ ddict_print(FILE* fh, ddict_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_DIAM_DICT_STANDALONE
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
*/
|
||||
%option never-interactive
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* Prefix scanner routines with "Dtd_Parse_" rather than "yy", so this scanner
|
||||
* can coexist with other scanners.
|
||||
|
@ -367,14 +372,3 @@ extern dtd_build_data_t* dtd_parse(GString* s) {
|
|||
|
||||
return build_data;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,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.
|
||||
*/
|
||||
|
@ -230,14 +235,3 @@ extern GString* dtd_preparse(const gchar* dname,const gchar* fname, GString* er
|
|||
|
||||
return output;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,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.
|
||||
*/
|
||||
|
@ -640,17 +645,6 @@ gboolean radius_load_dictionary (radius_dictionary_t* d, gchar* dir, const gchar
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
*/
|
||||
%option never-interactive
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* Prefix scanner routines with "uat_load_" rather than "yy", so this scanner
|
||||
* can coexist with other scanners.
|
||||
|
@ -375,16 +380,3 @@ uat_load_str(uat_t *uat_in, char *entry, char **err)
|
|||
*err = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,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;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,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.
|
||||
*/
|
||||
|
@ -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;
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
*/
|
||||
%option never-interactive
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
%{
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -88,10 +93,3 @@ eol \r?\n\r?
|
|||
{directive} { parse_token(T_DIRECTIVE, yytext); }
|
||||
{comment} ; /* ignore comments */
|
||||
{text} { parse_token(T_TEXT, yytext); }
|
||||
|
||||
%%
|
||||
|
||||
int yywrap(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@ Prototypes:
|
|||
void CONCAT(MODNAME,_scanner_text(char *text));
|
||||
void CONCAT(MODNAME,_scanner_file(FILE *fh));
|
||||
void CONCAT(MODNAME,_scanner_cleanup(void));
|
||||
#ifndef YY_SKIP_YYWRAP
|
||||
int CONCAT(MODNAME,_wrap(void));
|
||||
#endif
|
||||
|
||||
#include <cppmagic.h>
|
||||
|
||||
|
|
|
@ -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); }
|
||||
|
||||
<<EOF>> { write_current_packet(); yyterminate(); }
|
||||
|
||||
%%
|
||||
int yywrap(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,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;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
*/
|
||||
%option never-interactive
|
||||
|
||||
/*
|
||||
* We want to stop processing when we get to the end of the input.
|
||||
*/
|
||||
%option noyywrap
|
||||
|
||||
/*
|
||||
* Prefix scanner routines with "K12Text_" rather than "yy", so this scanner
|
||||
* can coexist with other scanners.
|
||||
|
@ -461,14 +466,3 @@ k12text_dump_can_write_encap(int encap)
|
|||
return WTAP_ERR_UNWRITABLE_ENCAP;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue