夹板的示例 rc 文件

发布于 2024-07-23 12:13:52 字数 162 浏览 8 评论 0原文

我正在使用夹板进行代码检查,它会抛出大量警告。 我想其中一些可以忽略不计。 我正在通过反复试验来创建 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月隐月明月朦胧 2024-07-30 12:13:53

这可能不是最大的帮助,但我认为您需要提供更多有关您收到的错误消息类型以及您正在使用的目标处理器/编译器的信息。 嵌入式目标处理器的不同编译器都有自己的语法来提供特定的功能(例如中断处理、转移到管理程序模式和硬件接口)。

我曾尝试在 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.

∞梦里开花 2024-07-30 12:13:53

我从未使用过 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文