linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Dryomov <idryomov@gmail.com>
To: Tony Lu <tonylu@linux.alibaba.com>
Cc: linux-block <linux-block@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: 'current_state' is uninitialized in rbd_object_map_update_finish()
Date: Wed, 13 Nov 2019 12:21:10 +0100	[thread overview]
Message-ID: <CAOi1vP98n4coOhc79Q+t63sCGvLmpXCwEYf8yuME+ST2K1HDsw@mail.gmail.com> (raw)
In-Reply-To: <20191113013529.GA64000@TonyMac-Alibaba>

On Wed, Nov 13, 2019 at 2:35 AM Tony Lu <tonylu@linux.alibaba.com> wrote:
>
> Hello,
>
> There is a warning during compiling driver rbd for uninitialized
> 'current state' in rbd_object_map_update_finish():
>
> drivers/block/rbd.c: In function 'rbd_object_map_callback':
> drivers/block/rbd.c:2122:21: warning: ‘current_state’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>       (current_state == OBJECT_EXISTS && state == OBJECT_EXISTS_CLEAN))
>
> drivers/block/rbd.c:2090:23: note: ‘current_state’ was declared here
>   u8 state, new_state, current_state;
>                        ^~~~~~~~~~~~~

Hi Tony,

It looks like this warning was also reported by kbuild, on gcc 6.3 and
7.4.  It's bogus, I'll send a patch to silence it.

Thanks,

                Ilya

      reply	other threads:[~2019-11-13 11:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  1:35 'current_state' is uninitialized in rbd_object_map_update_finish() Tony Lu
2019-11-13 11:21 ` Ilya Dryomov [this message]

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=CAOi1vP98n4coOhc79Q+t63sCGvLmpXCwEYf8yuME+ST2K1HDsw@mail.gmail.com \
    --to=idryomov@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tonylu@linux.alibaba.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).