Funny mistake

der Mouse mouse at thunder.mcrcim.mcgill.edu
Sat Mar 23 20:54:34 AEST 1991


In article <13584 at helios.TAMU.EDU>, byron at archone.tamu.edu (Byron Rakitzis) writes:
> Flame on:
Whooossshhhhh....
> I have had uniformly bad experience with lint.  [...] [M]any of its
> warnings are not pertinent to the code.  For example, the "pointer
> alignment" problem with every call to malloc, and the "returns a
> value which is ignored" problem with every call to printf.

As someone else pointed out, printf can fail.  Nonetheless, I agree
with you - the level of robustness that calls for error-checking every
call to printf is seldom called for.

What I did was to write a wrapper for lint that chucks complaints based
on egrep patterns (kept in ~/.lintx).  My list of patterns, for example:

^ioctl, arg. 3 used inconsistently
^malloc, arg. 1 used inconsistently
returns value which is always ignored$
returns value which is sometimes ignored$
^argvec used(.*), but not defined$
#include of /usr/include/... may be non-portable$

the last one being due to an idiocy in Sun's cpp, and the next-to-last
because nobody (yet :-) seems to agree with me about argvec/argcnt.

> Flame off.
...ssshhhhh *snik*

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.lang.c mailing list