Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!richsun!cweir From: cweir@richsun.UUCP (Charles Weir) Newsgroups: comp.lang.c Subject: Lint recommendations (Is DOS so much better than Unix?) Summary: Want a comprehensive lint. Keywords: lint productivity c unix Message-ID: <625@richsun.UUCP> Date: 19 Oct 89 20:27:38 GMT Reply-To: cweir%richsun.UUCP@uunet.uu.net (Charles Weir) Organization: RICH Inc. , Franklin Park,IL Lines: 32 DETECTING BUGS -------------- There are a number of common bugs which are easy to detect mechanically. Some examples which come to mind are:- 1) if (i=0) ... /* = for == */ 2) function() { char array[3]; return (array); } /* Invalid pointer return */ 3) function() { int i; if (i == 3) ... } /* uninitialised variable */ I know of two MSDOS - based lint programs which will find these (and some 50 or so other) similar issues. And I was appalled coming to Unix (SunOs 4, in fact) to find that the standard lint will not do that. Does anyone know of Unix programs which will do the same job? I consider this very important to increase programmer productivity. And I will summarise any information received to the net. Look for "Summary: Lint Recommendations". (Please don't start an argument about whether (1) is OK or not. Yes, I know it's a construction which is frequently used. The point is that here it isn't what the programmer intended. Both the MSDOS lints allow you to ignore specified types of errors.) -- Charles Weir, Rich Inc, Franklin Park, IL 60131 Email: cweir@richsun.uucp uunet!richsun!cweir