【发布时间】:2014-02-23 13:09:30
【问题描述】:
根据Splint FAQ:
对于 Win32,Splint 查找 splint.rc 而不是 .splintrc,因为 DOS 文件名限制。它将首先在当前目录中查找, 然后在你的主目录中。
我设置了一个非常简单的测试来尝试让 Splint 工作:
- 步骤 1:将
splint-3.1.1.win32.zip提取到c:\splint -
第二步:在
c:\test\test.c中放一个简单的程序:空主(空){ }
第 3 步:运行“cmd”
- 第四步:输入命令:
cd c:\test\
然后我尝试使用夹板,没有夹板.rc,也没有标志
- 第五步:输入命令`c:\splint\bin\splint.exe test.c'
正如预期的那样,这会产生输出The function main does not output the expected type
然后我尝试使用夹板,没有夹板.rc,和-maintype标志
- 第五步:输入命令`c:\splint\bin\splint.exe test.c -maintype'
正如预期的那样,输出不再产生The function main does not output the expected type。
然后我尝试使用夹板,带有 splint.rc,其中是 -maintype 标志
- 第五步:在
c:\test\splint.rc我把内容-maintype。 - 第五步:输入命令`c:\splint\bin\splint.exe test.c'
因为我在splint.rc 中输入了-maintype,并且因为我正在从包含splint.rc 的目录中运行夹板命令,所以夹板不应该出现关于主功能的警告,但它做。我猜 slint 没有获取 splint.rc 配置文件。
我做错了什么? 谢谢
【问题讨论】: