From 3a32ce9f829eae7586ff830f2f2c8a497887fa97 Mon Sep 17 00:00:00 2001 From: Michael Lum Date: Wed, 22 Apr 2009 21:10:00 +0000 Subject: [PATCH] fixed flex problem in hardcore mode git-svn-id: https://lwes.svn.sourceforge.net/svnroot/lwes/lwes/trunk@115 a2f82657-cdd2-4550-bd36-68a8e7111808 --- src/lwes_esf_parser.l | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lwes_esf_parser.l b/src/lwes_esf_parser.l index 3a1222b..8ced0eb 100644 --- a/src/lwes_esf_parser.l +++ b/src/lwes_esf_parser.l @@ -13,6 +13,13 @@ #undef YY_DECL #define YY_DECL int lweslex( YYSTYPE *lvalp, void *param) +/* this fixes a problem in flex where compiling with -Wall fails since + the ECHO macro ignores the output of fwrite(). So we assign the output + to a static variable but don't use it so the compile suceeds */ +static int __lwesfwriteout; +#define ECHO _fwout = fwrite( yytext, yyleng, 1, yyout ) + +/* function prototypes */ int lweslex(YYSTYPE *lvalp, void *param); void lweslexdestroy (void); -- 2.11.4.GIT