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>
string parent_pool, parent_name, parent_snapname;
uint8_t old_format;
uint64_t overlap, features;
- bool snap_protected;
+ bool snap_protected = false;
int r;
r = image.stat(info, sizeof(info));