夹板的示例 rc 文件
我正在使用夹板进行代码检查,它会抛出大量警告。 我想其中一些可以忽略不计。 我正在通过反复试验来创建 .splintrc 。
我的问题是,
是否有一些可以使用的示例 .splintrc 文件?
我正在使用为多任务嵌入式系统编写的 C 代码的夹板。
I am using splint for code checking, and it is throwing out a huge number of warnings. Some of them, I guess can be ignored. I am in the process of creating the .splintrc by trial and error.
My question,
Is there some sample .splintrc file that can be used?
I am using splint for C code, written for a multi-tasking embedded system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能不是最大的帮助,但我认为您需要提供更多有关您收到的错误消息类型以及您正在使用的目标处理器/编译器的信息。 嵌入式目标处理器的不同编译器都有自己的语法来提供特定的功能(例如中断处理、转移到管理程序模式和硬件接口)。
我曾尝试在 IAR 下的 MSP430 上使用夹板,但由于数量太多而放弃了。当它尝试处理编译器提供的硬件接口定义文件时抛出的警告和错误。 我硬着头皮购买了 Gimpel LINT,它附带了一些配置文件,我可以修改这些文件以支持我正在使用的编译器和处理器的精确风格。
This may not be the greatest of help but I think that you need to provide a bit more information about the type of error messages that you are getting and the target processor/compiler that you are using. The different compilers for embedded target processors all have their own syntax to provide their specific functionality (interrupt processing, transferring to supervisor modes and hardware interfacing are examples)
I have tried to use splint on the MSP430 under IAR and gave up because of the number of warnings and errors that it was throwing when it tried to process the compiler supplied hardware interface definition files. I bit the bullet and purchased Gimpel LINT which came with some configuration files that I could modify to support the precise flavour of compiler and processor I was using.
我从未使用过 Splint,但使用过 PC-Lint,这也是我的经验。 如果没有编译器配置文件,lint 工具将抛出大量错误。
您需要为您的编译器找到或创建特定于编译器的配置文件,通知 linting 工具它使用的特殊(非标准)C 构造和宏,这些文件应该被 linting 工具忽略,否则您将继续抛出大量内容的错误。
然而,这是值得的。 对代码进行 Linting 将帮助您立即发现错误,而不是在测试期间发现错误,因为错误更难发现且修复成本更高。
I have never worked with Splint, but have worked with PC-Lint, and this was my experience as well. Without the compiler configuration files, the lint tool will throw a ton of errors.
You will need to find or create compiler-specific configurations files for your compiler informing the linting tool of the special (non-standard) C constructs and macros that it uses which should be ignored by the linting tool, or you will continue to throw tons of errors.
It is worth the effort, however. Linting your code will help you find errors now instead of during testing when they are harder to find and much more expensive to fix.