[splint-discuss] 'splint' and sys/types.h

Roman Mashak mrv at corecom.co.kr
Thu Oct 26 01:26:30 EDT 2006


Hello, Michael!
You wrote to "Discussions about the Splint annotation-assisted static 
analysisproject" <splint-discuss at cs.virginia.edu> on Wed, 25 Oct 2006 
07:38:04 -0700:

[skip]
 MW> I'd start by checking for missing predefines in the Splint
 MW> configuration.  If that doesn't reveal the problem, try pre-processing
 MW> the source with gcc (what's that - the -P option, maybe?) and finding
 MW> out just where u_int8_t actually gets defined for this program.  Then
 MW> you'll know where to put your skipposixheaders annotations.
I ran preprocessor (gcc -E) and found 'u_int8_t' has been really defined in 
sys/types.h:

typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));

I put this line directly into the code, removed inclusion of sys/types.h and 
this made splint happy. The problem seems to be different.

Also 'splint' processes the code fine, if the definition of the 'u_int8_t' 
(or another) is supplied in command line (but it's just a workaround):

%splint -Du_int8_t="unsigned int" +posixlib.c foo.c

With best regards, Roman Mashak.  E-mail: mrv at corecom.co.kr 




More information about the splint-discuss mailing list