All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Koen Vandeputte <koen.vandeputte@ncentric.com>, netdev@vger.kernel.org
Subject: Re: Compiler warning
Date: Mon, 4 Feb 2019 18:55:19 -0800	[thread overview]
Message-ID: <e5d6fb7f-715c-2959-8a1b-24629a2bb2a1@gmail.com> (raw)
In-Reply-To: <60f98697-952d-aa39-765f-29736de0c4a2@ncentric.com>

On 2/4/19 3:43 AM, Koen Vandeputte wrote:
> Hi All,
> 
> I'm seeing following compiler warning during kernel compilation
> (5.0-rc5  and  4.14.96):
> 
> 
> net/core/dev.c: In function 'validate_xmit_skb_list':
> net/core/dev.c:3405:15: warning: 'tail' may be used uninitialized in
> this function [-Wmaybe-uninitialized]
>     tail->next = skb;
>     ~~~~~~~~~~~^~~~~
> 
> 
> Source shows this:
> 
> https://elixir.bootlin.com/linux/v5.0-rc5/source/net/core/dev.c#L3387
> 
> Looks like "tail" can get deferenced while it indeed doesn't get
> initialized? Kind regards, Koen
> 

same with this one - false positive. head is initialized to NULL. tail
is set on the first pass through the loop.

What compiler / version is this?

  reply	other threads:[~2019-02-05  2:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 11:43 Compiler warning Koen Vandeputte
2019-02-05  2:55 ` David Ahern [this message]
2019-02-07 13:55   ` Koen Vandeputte
  -- strict thread matches above, loose matches on Subject: below --
2001-03-21 14:28 compiler warning Matthias Fuchs
2001-03-21 17:11 ` Cal Erickson

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=e5d6fb7f-715c-2959-8a1b-24629a2bb2a1@gmail.com \
    --to=dsahern@gmail.com \
    --cc=koen.vandeputte@ncentric.com \
    --cc=netdev@vger.kernel.org \
    /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.