To use the static code check tool splint, after downloading the tar package, compile and generate the following questions:
Csf-. O: In function 'input ':
/Home/wine/splint-3.1.2/src/cstrap. C: 2483: Undefined reference to 'yywrap'
Csung. O: In function 'yylex ':
/Home/wine/splint-3.1.2/src/cstrap. C: 2133: Undefined reference to 'yywrap'
Collect2: LD returned 1 exit status
Gmake [2]: *** [splint] Error 1
Gmake [2]: Leaving directory '/home/wine/splint-3.1.2/src'
Gmake [1]: *** [All-recursive] Error 1
Gmake [1]: Leaving directory '/home/wine/splint-100'
Make: *** [all] Error 2
Asked by David Evans [evans@cs.virginia.edu]
He replied:
The yywrap error is because of not having (or finding) bison/flex installed.
However, my system has obviously installed flex:
Find a feasible solution on the Internet and verify it as follows:
Solution: directly add the function yywrap in C6. the definition of yywrap is as follows:
Int yywrap ()
{
Return 1;
}
Post address: http://www.cppblog.com/ngaut/archive/2006/07/05/9450.html
Splint configuration reference:
Http://blog.csdn.net/wchinaw/article/details/6331131
Official splint Website:
Http://www.splint.org/documentation/