]> git.tuebingen.mpg.de Git - lopsub.git/commit
Avoid warning about yywrap being redefined.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Apr 2017 00:55:53 +0000 (02:55 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Apr 2017 01:08:04 +0000 (03:08 +0200)
commite5b276f1a15604f1c7efe754074a86fabbb6bf6f
tree0397ff27af7566036f17d428891740b135b50fad
parent9d3fd447f36e1a144a40037d559a92562d120703
Avoid warning about yywrap being redefined.

The flex documentation says

If you do not supply your own version of 'yywrap()', then you must
either use '%option noyywrap' (in which case the scanner behaves as
though 'yywrap()' returned 1), or you must link with '-lfl' to obtain
the default version of the routine, which always returns 1.

Unfortunately, if noyywrap is given, gcc-5.4.0 complains with

config_file.c:417:0: warning: "yywrap" redefined

 ^
config_file.c:74:0: note: this is the location of the previous definition

Just provide our own yywrap() to silence the warning.
config_file.l
lopsubgen.l