bin/71628: [PATCH] cleanup of the usr.sbin/rpcbind code
dd at freebsd.org
Sun Sep 12 20:12:54 PDT 2004
[talking about constructs like this: SVCXPRT *my_xprt = my_xprt;]
Dan Lukes <dan at obluda.cz> wrote:
> On Sun, 12 Sep 2004, Giorgos Keramidas wrote:
> > No. I don't know why you think that this is a good fix for all the
> > uninitialized pointer warnings. It's not. Never :-/
> Why ? It's written within the "description" section of the PR.
> Warning shoult be "attention marks" - THIS CONSTRUCT SHOULD BE REVIEWED.
Any initialization in the form "T v = v" invokes undefined behavior by
using the indeterminate value of an object. Eliminating a warning or
saving one instruction is never worth having broken code. If the
compiler can't be convinced that the variable is never used before
being initialized, please initialize it to something obviously bogus.
More information about the freebsd-bugs