From b19bb601b761a648a92e5e8d615117f8080ae16f Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sat, 1 Jun 2024 00:30:34 -0400 Subject: [PATCH] Initialize when not assigning. --- src/chain/script.cpp | 2 +- src/chain/witness.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chain/script.cpp b/src/chain/script.cpp index 5453ec569f..9a6c2a0b62 100644 --- a/src/chain/script.cpp +++ b/src/chain/script.cpp @@ -250,7 +250,7 @@ script script::from_data(reader& source, bool prefix) NOEXCEPT source.set_limit(expected); } - operations ops; + operations ops{}; ops.reserve(op_count(source)); const auto start = source.get_read_position(); diff --git a/src/chain/witness.cpp b/src/chain/witness.cpp index 255024236d..0b3a0ccafd 100644 --- a/src/chain/witness.cpp +++ b/src/chain/witness.cpp @@ -172,7 +172,7 @@ static data_chunk read_element(reader& source) NOEXCEPT witness witness::from_data(reader& source, bool prefix) NOEXCEPT { size_t size{}; - chunk_cptrs stack; + chunk_cptrs stack{}; if (prefix) {