svn commit: r250430 - head/sbin/dmesg
Eitan Adler
eadler at freebsd.org
Fri May 10 14:13:06 UTC 2013
On 10 May 2013 10:08, David Chisnall <theraven at freebsd.org> wrote:
> On 10 May 2013, at 10:01, Eitan Adler <eadler at FreeBSD.org> wrote:
>
>> I thought style(9) disliked the leading (void) but I could be wrong.
>
> The cast to (void) tells the compiler that you are ignoring the return result. Without it, you will introduce new warnings and break the build on certain compiler versions with -Werror.
I know why the (void) is there. lint(1) is the main program which
cares about it. I don't remember any recent tool which uses that cast
to remove errors. This has nothing to do with my change though.
That said I remembered some prior discussion claiming that style(9)
does not require them. A quick recheck shows
(void)fprintf(stderr, "usage: f [-ab]\n");
as an example, so clearly I was wrong.
--
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams
More information about the svn-src-all
mailing list