[Lldb-commits] [lldb] dcd0926 - [lldb] Fix a couple of use-of-uninit-var errors in Materializer.cpp
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 26 08:01:59 PST 2022
Author: Pavel Labath
Date: 2022-01-26T17:01:53+01:00
New Revision: dcd0926ad018f50a3d91011424e063838888a4e0
URL: https://github.com/llvm/llvm-project/commit/dcd0926ad018f50a3d91011424e063838888a4e0
DIFF: https://github.com/llvm/llvm-project/commit/dcd0926ad018f50a3d91011424e063838888a4e0.diff
LOG: [lldb] Fix a couple of use-of-uninit-var errors in Materializer.cpp
These were probably not picked up before because they only run when
logging is enabled.
Added:
Modified:
lldb/source/Expression/Materializer.cpp
Removed:
################################################################################
diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp
index 3945f3a70f756..d40365d60fb3b 100644
--- a/lldb/source/Expression/Materializer.cpp
+++ b/lldb/source/Expression/Materializer.cpp
@@ -700,7 +700,7 @@ class EntityVariable : public Materializer::Entity {
DumpHexBytes(&dump_stream, data.GetBytes(), data.GetByteSize(), 16,
load_addr);
- lldb::offset_t offset;
+ lldb::offset_t offset = 0;
ptr = extractor.GetAddress(&offset);
@@ -978,7 +978,7 @@ class EntityResultVariable : public Materializer::Entity {
DumpHexBytes(&dump_stream, data.GetBytes(), data.GetByteSize(), 16,
load_addr);
- lldb::offset_t offset;
+ lldb::offset_t offset = 0;
ptr = extractor.GetAddress(&offset);
More information about the lldb-commits
mailing list