根据夹板常见问题
对于Win32,由于DOS文件名的限制,夹板寻找的是splint.rc而不是.splintrc。它将首先在当前目录中,然后在您的主目录中查找。
为了让夹板正常工作,我做了一个非常简单的测试:
splint-3.1.1.win32.zip解压缩为c:\splintc:\test\test.c中放置一个简单的程序:
空主(空){}cd c:\test\然后我尝试使用夹板,没有splint.rc,也没有标志
正如预期的那样,这将产生输出The function main does not output the expected type
然后我尝试使用夹板,没有splint.rc,和-maintype标志
正如预期的那样,输出不再生成The function main does not output the expected type。
然后我尝试使用夹板,与一起使用,其中包含-maintype标志。
c:\test\splint.rc中,我将内容放在-maintype中。因为我在-maintype中输入了splint.rc,而且由于我从包含splint.rc的目录中运行splint命令,splint不应该给出关于主函数的警告,但是它会。我猜splint没有选择splint.rc配置文件。
我做错了什么?谢谢
发布于 2014-02-23 16:02:22
同时,通过使用-f标志来包含它,我已经让它工作起来了:
c:\splint\bin\splint.exe test.c -f splint.rchttps://stackoverflow.com/questions/21968639
复制相似问题