LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Looking for a lint clone

[ILUG] Looking for a lint clone

P at draigBrady.com P at draigBrady.com
Mon Jul 25 10:06:00 IST 2005


Bryan O'Donoghue wrote:
> Inhabitants of ILUG.. lower your shields and surrender your vessels...
> 
> ...Greetings !
> 
> What do people out there in ILUG land use, or recommend to use, as a
> lint type scource code checker ?
> 
> splint, (*)lint ? Is there a semi-universally accepted obvious choice (tm) ?

I tried splint (3 years ago) and thought it wasn't great.
Previoiusly I used flexelint: http://www.gimpel.com/ and
thought it was great.

valgrind is a related tool which is excellent.

> Ideally, I'd like a tool which could intercept the following.
> 
> char x[2];
> memset(x, 0x0,20); ?

Note a common error related to that is to switch the
last 2 arguments to memset. ( grep 'memset.*0[^,]*)' ):
http://www.livejournal.com/users/kernelslacker/5755.html
Note the comment at the bottom there that newer gcc/glibc's
issue a warning for this.

> Be that a runtime piece of magic software... else... a source code
> parser, with some damn good (tm) context awareness.
> 
> Disclaimer : I've never used lint... but, people keep raving about it to
> me. For the case above valgrind emphatically won't catch that error, or
> if it will, I don't know the correct runtime incantation to make it do so.

You get some of lint's functionality by using the -Wall gcc option,
and this will get better as commented above.

Personally I find -Wall + valgrind adequate.

-- 
Pádraig Brady - http://www.pixelbeat.org
--



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell