lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <000501d15fb7$86d847b0$9488d710$@cmss.chinamobile.com>
Date:	Fri, 5 Feb 2016 09:50:00 +0800
From:	张胜举 <zhangshengju@...s.chinamobile.com>
To:	"'Stephen Hemminger'" <stephen@...workplumber.org>
Cc:	<netdev@...r.kernel.org>
Subject: Reply: [PATCH iproute2] ip-link: remove warning message

> On Thu, 21 Jan 2016 02:23:49 +0000
> Zhang Shengju <zhangshengju@...s.chinamobile.com> wrote:
> 
> > the warning was:
> > iproute.c:301:12: warning: 'val' may be used uninitialized in this
> > function [-Wmaybe-uninitialized]
> >    features &= ~RTAX_FEATURE_ECN;
> >             ^
> > iproute.c:575:10: note: 'val' was declared here
> >    __u32 val;
> > 	  ^
> >
> > Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
> > ---
> >  ip/iproute.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ip/iproute.c b/ip/iproute.c index d5e3ebe..afe70e1 100644
> > --- a/ip/iproute.c
> > +++ b/ip/iproute.c
> > @@ -572,7 +572,7 @@ int print_route(const struct sockaddr_nl *who,
> struct nlmsghdr *n, void *arg)
> >  			mxlock =
> *(unsigned*)RTA_DATA(mxrta[RTAX_LOCK]);
> >
> >  		for (i=2; i<= RTAX_MAX; i++) {
> > -			__u32 val;
> > +			__u32 val = 0U;
> >
> >  			if (mxrta[i] == NULL)
> >  				continue;
> 
> Your compiler is doing bad dependency analysis.
> There is not really a bug here.
> 
> It would still be best to initialize to keep broken compilers from causing
> warning.

Yes, it's not really a bug here. This variable is set by all means.  This
patch just want to remove the warning. 

Thanks,
Shengju



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ