[Lldb-commits] [lldb] r184334 - Fix two 'variable is used uninitialised' warnings. Change assert to llvm_unreachable.

Andy Gibbs andyg1001 at hotmail.co.uk
Wed Jun 19 12:05:53 PDT 2013


Author: andyg
Date: Wed Jun 19 14:05:52 2013
New Revision: 184334

URL: http://llvm.org/viewvc/llvm-project?rev=184334&view=rev
Log:
Fix two 'variable is used uninitialised' warnings.  Change assert to llvm_unreachable.

Modified:
    lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp

Modified: lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp?rev=184334&r1=184333&r2=184334&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp Wed Jun 19 14:05:52 2013
@@ -488,13 +488,13 @@ POSIXThread::ThreadNotify(const ProcessM
 unsigned
 POSIXThread::GetRegisterIndexFromOffset(unsigned offset)
 {
-    unsigned reg;
+    unsigned reg = 0;
     ArchSpec arch = Host::GetArchitecture();
 
     switch (arch.GetCore())
     {
     default:
-        assert(false && "CPU type not supported!");
+        llvm_unreachable("CPU type not supported!");
         break;
 
     case ArchSpec::eCore_x86_32_i386:





More information about the lldb-commits mailing list