From 08225b9f7ad10c2b52a5966fe09dde03b2f490cc Mon Sep 17 00:00:00 2001 From: Steve Murphy Date: Tue, 9 Dec 2008 20:40:31 +0000 Subject: Merged revisions 162264 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r162264 | murf | 2008-12-09 13:20:54 -0700 (Tue, 09 Dec 2008) | 1 line In discussion with seanbright on #asterisk-dev, I have added a default rule, and an option to suppress the default rule from being generated in the flex output, for the sake of those OS's where they didn't tweak flex's ECHO macro, and the compiler doesn't like it. The regressions are OK with this. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162271 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/ael/ael.flex | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'res/ael/ael.flex') diff --git a/res/ael/ael.flex b/res/ael/ael.flex index b44b31e75..0674ba8ff 100644 --- a/res/ael/ael.flex +++ b/res/ael/ael.flex @@ -35,6 +35,14 @@ %option prefix="ael_yy" %option noyywrap 8bit +/* I specify this option to suppress flex generating code with ECHO + in it. This generates compiler warnings in some systems; We've + seen the fwrite generate Unused variable warnings with 4.1.2 gcc. + Some systems have tweaked flex ECHO macro to keep the compiler + happy. To keep the warning message from getting output, I added + a default rule at the end of the patterns section */ +%option nodefault + /* yyfree normally just frees its arg. It can be null sometimes, which some systems will complain about, so, we'll define our own version */ %option noyyfree @@ -643,6 +651,8 @@ includes { STORE_POS; return KW_INCLUDES;} } } +<*>.|\n { /* default rule */ ast_log(LOG_ERROR,"Unhandled char(s): %s\n", yytext); } + %% static void pbcpush(char x) -- cgit v1.2.3