[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Possible unsafe use of strncat in sbin/sysctl/sysctl.c
On Wed, Aug 24, 2011 at 12:08:43AM +0200, Joerg Sonnenberger wrote:
> > > (void)wait! That was a pure personal remark. I really don't know where
> > > that (void)bla idiom comes from, and I obviously don't (void)like it.
> > It's an artifact of our stupid lint(1).
> Not really, it is used by other analyzers to mean "yes, I know this
> returns something, but I don't care". The major exception of course is
> that GCC broke it for the attributed usage -- half of the pain of
> dealing with modern glibc in this regard.
Indeed. A lot of tools use the idiom of casting something to void to
ignore it, including gcc in most other contexts.
However, it's lint that enforces it to the point of stupidity.
David A. Holland
Main Index |
Thread Index |