Subject: Re: usr.bin/make
To: Christos Zoulas <christos@tac.gw.com>
From: Max Okumoto <okumoto@ucsd.edu>
List: tech-toolchain
Date: 02/01/2005 04:24:12
>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.

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

4. We are removing casting to '(void)' from our
   code base :-)

                Max

PS.  I looked at /usr/share/misc/style and there
     is confusion there too :-)

     printf(...)        without a cast
     (void)fprintf(...) with a cast