public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lu <tonylu@linux.alibaba.com>
To: idryomov@gmail.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: 'current_state' is uninitialized in rbd_object_map_update_finish()
Date: Wed, 13 Nov 2019 09:35:29 +0800	[thread overview]
Message-ID: <20191113013529.GA64000@TonyMac-Alibaba> (raw)

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;
                       ^~~~~~~~~~~~~

Cheers.
Tony Lu

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

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

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=20191113013529.GA64000@TonyMac-Alibaba \
    --to=tonylu@linux.alibaba.com \
    --cc=idryomov@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox