According the Splint FAQ:
For Win32, Splint looks for splint.rc instead of .splintrc due to the DOS filename limitations. It will look first in the current directory, then in your home directory.
I've set up a very simple test to try to get Splint working:
- step 1: Extract
splint-3.1.1.win32.zip
intoc:\splint
step 2: In
c:\test\test.c
put a simple program:void main(void){ }
step 3: Run "cmd"
- step 4: Enter command:
cd c:\test\
Then I try to use splint, without splint.rc, and no flags
- step 5: Enter command `c:\splint\bin\splint.exe test.c'
As expected, this produces the output The function main does not output the expected type
Then I try to use splint, without splint.rc, and the -maintype flag
- step 5: Enter command `c:\splint\bin\splint.exe test.c -maintype'
As expected, the output no longer produces The function main does not output the expected type
.
Then I try to use splint, with splint.rc, within which is the -maintype flag
- step 5: in
c:\test\splint.rc
I put the contents-maintype
. - step 5: Enter command `c:\splint\bin\splint.exe test.c'
Because I entered -maintype
in splint.rc
, and because I'm running the splint command from the directory which has splint.rc
in it, splint should not be coming up with the warning about the main function, but it does. I'm guessing splint is not picking up the splint.rc configuration file.
What am I doing wrong? Thanks