任何工具来捕捉用C code愚蠢的错误? [英] Any Tools to Catch Silly Mistakes in C Code?

查看:85
本文介绍了任何工具来捕捉用C code愚蠢的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样浪费我的时间和我的同事的时候讨厌错字,它是这样的:

I had a nasty typo that wasted my time and my colleague's time, it was something like this:

for (i = 0; i < blah; i++); // <- I had a semi-colon here, that's the bug!
{
  // Some awesome logic here
}

首先,这是非常尴尬的,第二件事情,我不应该重复这个。我是比较新的C.在Java中,我想我可以使用 FindBugs的捕获错误这样的,我应该使用什么样的工具C code吗?皮棉?

First of all, it's very embarrassing, second thing, I should never repeat this. I'm relatively new to C. In Java, I guess I can use FindBugs to catch errors like these, what tool should I use for C code? Lint?

推荐答案

是的, PC-林特是可能可用的最佳工具。

Yes, PC-Lint is probably the best tool available.

这篇关于任何工具来捕捉用C code愚蠢的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆