How do I download and install lint?

我是研究僧i 提交于 2019-12-03 06:55:37

问题


Does anyone know how to obtain lint for Mac, Windows, and Linux? sudo port install lint can't find it.


回答1:


From the splint FAQ:

Splint supports most, but not all, of the C99 extensions to the ANSI C.

This implies that splint is alas not the same as lint. I've had personal experience with running splint on pieces of code like this:

for (int i; i < 100; i++)
    /* Run code */

As declaration of a variable inside the for loop header is not permitted until C99, like in this example, splint will complain about this. Hence, I'm still looking for a good alternative to splint for Ubuntu.




回答2:


I've only seen lint for BSD. There's splint, however, a GPL lint rewrite, and it's available on most Linux distributions.



来源:https://stackoverflow.com/questions/6881269/how-do-i-download-and-install-lint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!