pan/scan.l: Fix a building error (resend)
PATCH 1/1 pan/scan.l: Fix a building error (resend)
Hi Garrett,
When compiling the ltp source, it will error. The error messages are:
...
flex -l -t scan.l > scan.c
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -Wno-error -I/home/pht/ltp-dev/pan -I../include -I../include -c -o scan.o scan.c scan.l: In function ‘yylex’:
scan.l:153: error: ‘yylineno’ undeclared (first use in this function)
scan.l:153: error: (Each undeclared identifier is reported only once
scan.l:153: error: for each function it appears in.)
make: *** [scan.o] Error 1
rm scan.c
"%option nolex-compat" can silence warning, but also make the global variable "yylineno" undeclared. The following patch add "%option yylineno" to make the global variable "yylineno" to be accessed.
--- pan/scan.l | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
pan/scan.l +1 -0
@@ -91,6 +91,7 @@ static int check_mode(int, int, ...); %option noinput %option nolex-compat %option nounput +%option yylineno UI [0-9]+ A [a-zA-Z]+
Signature · 26 lines
1.7.3.1 -- Best Regards, Peng Haitao ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Please submit an autoconf-worthy testcase. That shouldn't be too hard to do (AC_TRY_RUN is your friend :).).
Quoted 33 lines · Peng Haitao
Hi Garrett,
When compiling the ltp source, it will error. The error messages are:
...
flex -l -t scan.l >scan.c
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -Wno-error -I/home/pht/ltp-dev/pan -I../include -I../include -c -o scan.oscan.cscan.l: In function ‘yylex’:
scan.l:153: error: ‘yylineno’ undeclared (first use in this function)
scan.l:153: error: (Each undeclared identifier is reported only once
scan.l:153: error: for each function it appears in.)
make: *** [scan.o] Error 1
rmscan.c"%option nolex-compat" can silence warning, but also make the global variable "yylineno" undeclared. The following patch add "%option yylineno" to make the global variable "yylineno" to be accessed.
Signed-off-by Peng Haitao <[email protected]>---
pan/scan.l | 1 +1 files changed, 1 insertions(+), 0 deletions(-)pan/scan.l +0
-0@@ -91,6 +91,7 @@ static int check_mode(int, int, ...);%option noinput
%option nolex-compat
%option nounput
+%option yylineno
Quoted 18 lines
UI [0-9]+
A [a-zA-Z]+Signature · 5 lines
1.7.3.1 -- Best Regards, Peng Haitao
------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list