All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Phil Sutter <phil@nwl.cc>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ip, route: fix minor compile warning
Date: Thu, 17 Dec 2015 17:12:03 -0800	[thread overview]
Message-ID: <20151217171203.723b4d16@xeon-e3> (raw)
In-Reply-To: <566EE5F0.9030504@iogearbox.net>

On Mon, 14 Dec 2015 16:53:20 +0100
Daniel Borkmann <daniel@iogearbox.net> wrote:

> On 12/14/2015 04:51 PM, Phil Sutter wrote:
> > On Mon, Dec 14, 2015 at 04:34:29PM +0100, Daniel Borkmann wrote:
> >> Seems like gcc (4.8.3) doesn't catch this false positive, triggering
> >> after 0f7543322c5f ("route: ignore RTAX_HOPLIMIT of value -1"):
> >>
> >>    iproute.c: In function 'print_route':
> >>    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;
> >>              ^
> >> So just shut it up by initializing to 0.
> >
> > Hmm. Interestingly, my patch shouldn't have changed anything relevant
> > for gcc's decision. OTOH, I don't see a warning using gcc-4.9.3.
> 
> If I revert it, the warning is gone for me ;) perhaps some heuristic issue
> with that gcc version.
> 
> Cheers,
> Daniel

I don't see this warning on current master with gcc 4.9.2.

  reply	other threads:[~2015-12-18  1:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 15:34 [PATCH iproute2] ip, route: fix minor compile warning Daniel Borkmann
2015-12-14 15:51 ` Phil Sutter
2015-12-14 15:53   ` Daniel Borkmann
2015-12-18  1:12     ` Stephen Hemminger [this message]
2015-12-18  9:18       ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151217171203.723b4d16@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.