All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koen Vandeputte <koen.vandeputte@ncentric.com>
To: David Ahern <dsahern@gmail.com>, netdev@vger.kernel.org
Subject: Re: Compiler warning
Date: Thu, 7 Feb 2019 14:55:10 +0100	[thread overview]
Message-ID: <ec477cd9-0bd2-25c5-70c3-c3b7187446b3@ncentric.com> (raw)
In-Reply-To: <e5d6fb7f-715c-2959-8a1b-24629a2bb2a1@gmail.com>


On 05.02.19 03:55, David Ahern wrote:
> 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?

Thanks for confirming David. (for both of the warnings)
This is seen using GCC 7.4.0

I don't know the policy upstream regarding compiler warnings .. so 
thought I should report these. :)

Regards,

Koen


  reply	other threads:[~2019-02-07 13: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
2019-02-07 13:55   ` Koen Vandeputte [this message]
  -- 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=ec477cd9-0bd2-25c5-70c3-c3b7187446b3@ncentric.com \
    --to=koen.vandeputte@ncentric.com \
    --cc=dsahern@gmail.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.