Subject: Re: usr.bin/make
To: Max Okumoto <okumoto@ucsd.edu>
From: James Chacon <jmc@NetBSD.org>
List: tech-toolchain
Date: 02/01/2005 11:10:44
On Tue, Feb 01, 2005 at 04:24:12AM -0800, Max Okumoto wrote:
> >In article <hf4qgxc1fp.fsf@multivac.sdsc.edu>,
> >Max Okumoto  <okumoto@ucsd.edu> wrote:
> >
> >>The following two attachments are a script that and the diffs
> >>generated by that script.  The script does the following:
> >>
> >>    * removes spaces between function name and parameters.
> >>       funcname (1, 2, 3) => funcname(1, 2, 3)
> >
> >that is fine.
> >
> >>    * removes (void) from in front of unsed return
> >>      values of functions.
> >>      (void)funcname(1, 2) => funcname(1, 2)
> >
> >that breaks lint. Why do you want to do it?
> >
> >christos
> 
> 1. It would make the code more consistant.
>    % cd usr.bin/make
>    % grep printf *.c
>    % grep close *.c
> 
> 2. It clutters the code without adding much
>     information.

I fail to see how it clutters the code really (and it's also making it
fairly obvious the function returned something and we're ignoring that fact).

> 
> 3. Does anyone really still use lint?  Compilers
>    today generate better warnings and most don't
>    warn about unused return values.

Yes. Our libraries get built with it still and lint often finds things
the compiler doesn't/can't.

James