device-mapper-persistent-data/0007-all-Fix-uninitialized-class-members.patch
2021-06-07 16:15:19 +02:00

84 lines
2.6 KiB
Diff

From f1e404c33ad14f6784aa1926ae75fa49e614748e Mon Sep 17 00:00:00 2001
From: Ming-Hung Tsai <mtsai@redhat.com>
Date: Wed, 2 Jun 2021 12:14:34 +0800
Subject: [PATCH 07/10] [all] Fix uninitialized class members
---
era/restore_emitter.cc | 1 +
thin-provisioning/metadata_dumper.cc | 10 +++++++---
thin-provisioning/thin_delta.cc | 4 +++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/era/restore_emitter.cc b/era/restore_emitter.cc
index c09fa66..7fbac7d 100644
--- a/era/restore_emitter.cc
+++ b/era/restore_emitter.cc
@@ -14,6 +14,7 @@ namespace {
: md_(md),
in_superblock_(false),
in_writeset_(false),
+ era_(0),
in_era_array_(false) {
}
diff --git a/thin-provisioning/metadata_dumper.cc b/thin-provisioning/metadata_dumper.cc
index 4feb40f..665c762 100644
--- a/thin-provisioning/metadata_dumper.cc
+++ b/thin-provisioning/metadata_dumper.cc
@@ -180,7 +180,7 @@ namespace {
// This is about classifying and summarising btree nodes. The use of a btree
// node may not be obvious when inspecting it in isolation. But more information
// may be gleaned by examining child and sibling nodes.
-//
+//
// So the process is:
// - scan every metadata block, summarising it's potential uses.
// - repeatedly iterate those summaries until we can glean no more useful information.
@@ -474,7 +474,7 @@ namespace {
node_info get_internal_info(block_manager::read_ref &rr) {
node_info info;
info.b = rr.get_location();
-
+
// values refer to blocks, so we should have infos for them.
auto n = to_node<block_traits>(rr);
::uint64_t key_low = 0;
@@ -524,7 +524,7 @@ namespace {
node_info info;
info.b = rr.get_location();
- auto vsize = to_cpu<uint32_t>(hdr.value_size);
+ auto vsize = to_cpu<uint32_t>(hdr.value_size);
info.values = to_cpu<uint32_t>(hdr.nr_entries);
if (vsize == sizeof(device_details_traits::disk_type)) {
@@ -645,6 +645,10 @@ namespace {
public:
mapping_emit_visitor(emitter::ptr e)
: e_(e),
+ origin_start_(0),
+ dest_start_(0),
+ time_(0),
+ len_(0),
in_range_(false) {
}
diff --git a/thin-provisioning/thin_delta.cc b/thin-provisioning/thin_delta.cc
index 5b31608..ee48dea 100644
--- a/thin-provisioning/thin_delta.cc
+++ b/thin-provisioning/thin_delta.cc
@@ -259,7 +259,9 @@ namespace local {
class simple_emitter : public diff_emitter {
public:
simple_emitter(indented_stream &out)
- : diff_emitter(out) {
+ : diff_emitter(out),
+ vbegin_(0),
+ vend_(0) {
}
void left_only(uint64_t vbegin, uint64_t dbegin, uint64_t len) {
--
1.8.3.1