]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd.cc: init 'snap_protected' to fix -Wconditional-uninitialized
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 8 May 2014 14:09:07 +0000 (16:09 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 8 May 2014 14:09:07 +0000 (16:09 +0200)
commit082367e8b2dba2899b9095d0b093d9f03258ecb8
treecefa4ef9b883203cdeec4c3120b614049cb908d6
parent0d01563f8b51dd47c878436ed61e4e63e09f5bda
rbd.cc: init 'snap_protected' to fix -Wconditional-uninitialized

Init 'snap_protected' with false to fix:

rbd.cc:544:35: warning: variable 'snap_protected' may be uninitialized
 when used here [-Wconditional-uninitialized]
      f->dump_string("protected", snap_protected ? "true" : "false");
                                  ^~~~~~~~~~~~~~
rbd.cc:482:22: note: initialize the variable 'snap_protected' to silence
 this warning
  bool snap_protected;
                     ^
                      = false

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rbd.cc