Subject: Re: Problems with lint(1)
To: Christos Zoulas <christos@zoulas.com>
From: Perry E. Metzger <perry@piermont.com>
List: tech-userlevel
Date: 07/27/1998 16:09:39
Christos Zoulas writes:
> >vfscanf.c(146): warning: expression has null effect
> >
> >                                nread++, fp->_r--, fp->_p++;
> 
> This can be fixed by altering the code to be { stmt; stmt; } instead of
> stmt, stmt

I'm sure this is a fine kludge, but shouldn't lint know that the other 
expression isn't "do nothing"?

> >2) All uses of va_start() and va_arg() generate warnings:
> >
> >vfscanf.c(277): warning: possible pointer alignment problem
> >vfscanf.c(277): warning: pointer casts may be troublesome
> >
> >                                *va_arg(ap, short *) = nread;
> 
> Well, changing the macro to "(type *)(void *) expr" from "(type *) expr"
> should silence it.

gak.

> >Can someone help fix these problems?
> 
> Older versions of lint were even worse...

Who maintains our lint?

.pm