Initialize the "is_loaded" local in LoadModuleAtAddress in
authorJason Molenda <jmolenda@apple.com>
Sun, 17 Jul 2016 20:01:54 +0000 (20:01 +0000)
committerJason Molenda <jmolenda@apple.com>
Sun, 17 Jul 2016 20:01:54 +0000 (20:01 +0000)
case Process::GetFileLoadAddress fails to set it to a real
value.  (fixing "conditional use of garbage value" clang warning)

llvm-svn: 275731

lldb/source/Core/DynamicLoader.cpp

index 0edc8c0..f41ff4a 100644 (file)
@@ -194,7 +194,7 @@ DynamicLoader::LoadModuleAtAddress(const FileSpec &file,
         {
             // 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)