Subject: Re: ARGSUSED and friends
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 01/18/2000 22:39:02
> OK - it seems to me you are saying "use lint" but you are not
> concerned about killing all the errors it claims to find.

Basically, yes.  If I were using lint these days, I would be
mechanically filtering out many of its whinings.

> I, personally, find it better to stomp all the lint whinges I can so
> that when there is a _real_ problem it sticks out like dog's nuts and
> does not get missed in the general wash of lint bitches.

Sure.  That's why I don't use lint. :-)

> One thing that lint does pick up that gcc does not is cross module
> problems.

True.  But -Wstrict-prototypes -Wmissing-prototypes plus the discipline
to keep all prototypes in common .h files, with no function prototyped
in more than one place, catches function-interface issues.  And I can't
recall the last time I had a cross-module data problem, perhaps because
I keep similar discipline with respect to global data.  (I wish gcc had
a similar switch for data....)

>>> ["pointer casts may be troublesome"]
>> Then the message is atrociously worded. :-)  This also doesn't match
>> a small test I just did:
> (ok - mea culpa :-)
> Hmmm - treating a floating point number as a char string, isn't that
> a trifle dodgy?

Oh, certainly.  I didn't propose to actually *run* that program.

If it makes you feel better, try

extern char *foo;
extern int *bar;

void blah(void)
{
 foo = (char *)bar;
}

I get the warning out of that too.  As I said, if silencing lint means
doing no pointer casts, it's Just Not Worth It.  To me, that borders on
"warning: variable names don't rhyme".

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B