Is there a way to stop splint
from analyzing system headers included, POSIX, libc etc.? I run with -warnposix -preproc
:
% splint -warnposix -preproc my.c
/usr/include/unistd.h:220:8: Parse Error: Non-function declaration:
__BEGIN_DECLS : int. (For help on parse errors, see splint -help
parseerrors.)
*** Cannot continue.
UPDATE:
% splint +posixlib +unixlib -I/path/to/myheaders -I/usr/include/x86_64-linux-gnu my.c
/usr/include/asm-generic/int-ll64.h:19:24: Parse Error:
Suspect missing struct or union keyword: __signed__ :
int. (For help on parse errors, see splint -help parseerrors.)
After reading splint FAQ14 I tried to eliminate nonstandard keyword:
% splint +posixlib +unixlib -D__signed__= -I/path/to/myheaders -I/usr/include/x86_64-linux-gnu my.c
/usr/include/x86_64-linux-gnu/sys/syslog.h:200:66: Parse Error:
Inconsistent function parameter syntax: __gnuc_va_list :
<any>. (For help on parse errors, see splint -help parseerrors.)
*** Cannot continue.
Declaring __gnuc_va_list
as nonstandard keyword doesn't help in this particular case. I feel that splint
is a powerful tool, but it requires to annotate almost every code it parses. Am I wrong?