[Lldb-commits] [lldb] r258546 - Silence -Wreturn-type warnings

Saleem Abdulrasool via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 22 12:26:30 PST 2016


Author: compnerd
Date: Fri Jan 22 14:26:30 2016
New Revision: 258546

URL: http://llvm.org/viewvc/llvm-project?rev=258546&view=rev
Log:
Silence -Wreturn-type warnings

Address a couple of instances of -Wreturn-type warning from GCC.  The switches
are covered, add an llvm_unreachable to the end of the functions to silence the
warning.  NFC.

Modified:
    lldb/trunk/source/Expression/ExpressionSourceCode.cpp
    lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258546&r1=258545&r2=258546&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Fri Jan 22 14:26:30 2016
@@ -119,6 +119,7 @@ public:
             default:
                 return false;
         }
+        llvm_unreachable("unhandled state");
     }
 
 private:

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258546&r1=258545&r2=258546&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Fri Jan 22 14:26:30 2016
@@ -1501,6 +1501,7 @@ Process::IsAlive ()
         default:
             return false;
     }
+    llvm_unreachable("unhandled state");
 }
 
 // This static callback can be used to watch for local child processes on




More information about the lldb-commits mailing list