Subject: Re: CVS commit: src/usr.bin/xlint/lint1
To: None <source-changes@NetBSD.org>
From: Christian Biere <christianbiere@gmx.de>
List: source-changes
Date: 10/18/2006 16:35:16
Havard Eidnes wrote:
> > ...and countless other bits of code that have been "fixed" over the  
> > years by casting constant arguments to one type or another.
 
> Yep.  Do you have suggestions for how to find these?  Coax lint
> into helping us? ;-)

This might be a good start:

$ grep -Er [(][a-z ]*(int[a-z0-9_]*|long|char)[)][ ]?[0-9] .

It shows some bogus casts of zero. The only case in which you need
to cast 0 is as parameter of variadic functions.

-- 
Christian