Date: Fri, 10 May 2013 10:12:34 -0400 From: Eitan Adler <eadler@freebsd.org> To: David Chisnall <theraven@freebsd.org> Cc: svn-src-head@freebsd.org, Alexey Dokuchaev <danfe@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r250430 - head/sbin/dmesg Message-ID: <CAF6rxgm-kW9nkxU_=iKNPBNwsoqSRqfxXJi%2BirjPQ8t%2B5OzkOg@mail.gmail.com> In-Reply-To: <B9131AF3-6954-4648-89C6-221F2EAA5904@FreeBSD.org> References: <201305100342.r4A3gmc9080595@svn.freebsd.org> <20130510074235.GA19945@FreeBSD.org> <CAF6rxgkHDzMPY7za8z--SSPz3VJGisM_nT96CX9xxKvU4h5TxA@mail.gmail.com> <20130510133637.GA1679@FreeBSD.org> <CAF6rxgntq78dOseBdB_o4a7Qk09kpzk1BS9KtCcW=gQSAa%2Bfhw@mail.gmail.com> <B9131AF3-6954-4648-89C6-221F2EAA5904@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10 May 2013 10:08, David Chisnall <theraven@freebsd.org> wrote: > On 10 May 2013, at 10:01, Eitan Adler <eadler@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgm-kW9nkxU_=iKNPBNwsoqSRqfxXJi%2BirjPQ8t%2B5OzkOg>