[Lldb-commits] [lldb] r275731 - Initialize the "is_loaded" local in LoadModuleAtAddress in

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Sun Jul 17 13:01:54 PDT 2016

Author: jmolenda
Date: Sun Jul 17 15:01:54 2016
New Revision: 275731

URL: http://llvm.org/viewvc/llvm-project?rev=275731&view=rev
Initialize the "is_loaded" local in LoadModuleAtAddress in
case Process::GetFileLoadAddress fails to set it to a real
value.  (fixing "conditional use of garbage value" clang warning)


Modified: lldb/trunk/source/Core/DynamicLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DynamicLoader.cpp?rev=275731&r1=275730&r2=275731&view=diff
--- lldb/trunk/source/Core/DynamicLoader.cpp (original)
+++ lldb/trunk/source/Core/DynamicLoader.cpp Sun Jul 17 15:01:54 2016
@@ -194,7 +194,7 @@ DynamicLoader::LoadModuleAtAddress(const
             // Try to fetch the load address of the file from the process as we need absolute load
             // address to read the file out of the memory instead of a load bias.
-            bool is_loaded;
+            bool is_loaded = false;
             lldb::addr_t load_addr;
             Error error = m_process->GetFileLoadAddress(file, is_loaded, load_addr);
             if (error.Success() && is_loaded)

More information about the lldb-commits mailing list