Hi,<br><br>I am new to splint tool, We tried to run splint on Linux drivers. Thanks in advance for your appreciated help ! <br><br>Is there any way to exclude the Linux kernel headers path when we try to run splint over our driver code, I mean to say if we have any option to exclude the linux kernel header files from getting parsed by the splint tool. I just wanted to check driver files with the splint tool. Here is the errors i got when I tried to run splint on my drivers.<br>
<br>This is the Makefile for splint:<br><br>CFLAGS += $(DEBFLAGS)<br>CFLAGS += -I..<br>CFLAGS += -I$(DEBUG_DIR_PATH)<br>CFLAGS += -I$(DRIVER_DIR_PATH)<br>CFLAGS += -I$(HW_DIR_PATH)<br>CFLAGS += -I$(APPS_DIR_PATH)<br>CFLAGS += -I$(OSDEP_PATH)<br>
CFLAGS += -D$(RELEASE_TYPE)<br><br>SPLINTFLAGS += -I$(CFLAGS)<br>SPLINTFLAGS += -I/lib/modules/`uname -r`/build/include<br><br>splint:<br> @$(ECHO) "Going for Splint Checking"<br> @splint -weak \<br>
-gnuextensions \<br> -macrovarprefixexclude \<br> -namechecks \<br> -skip-ansi-headers \<br> -preproc \<br> -expect 100 \<br>
-systemdirerrors \<br> -hints \<br> +trytorecover \<br> +posixlib \<br> $(SPLINTFLAGS) $(SRC_DIR_PATH)/slim_bus_hw.c<br>
<br>This is the O/P I got after running running this <br><br>[root@localhost build]# make splint<br>Going for Splint Checking<br>Splint <a href="http://3.0.1.7">3.0.1.7</a> --- 24 Jan 2003<br><br>Command Line: Setting -sysdirerrors redundant with current value<br>
/lib/modules/2.6.20/build/include/asm/types.h:13:24: Parse Error:<br> Suspect missing struct or union keyword: __signed__ :<br> unsigned short int. Attempting to continue.<br>/lib/modules/2.6.20/build/include/asm/types.h:19:23: Parse Error:<br>
Suspect missing struct or union keyword: __signed__ :<br> unsigned short int. Attempting to continue.<br>/lib/modules/2.6.20/build/include/asm/types.h:19:23:<br> Parse Error. Too many errors, giving up.<br>*** Cannot continue.<br>
make: *** [splint] Error 1<br><br>I have used Red Hat Linux 2.6.20 kernel for the include file<br><br clear="all">-- <br>Regards <br>Vijayendra Suman