[Lldb-commits] [lldb] r268756 - debugserver: fix a few -Wcovered-swift-default warnings
Saleem Abdulrasool via lldb-commits
lldb-commits at lists.llvm.org
Fri May 6 10:33:02 PDT 2016
Author: compnerd
Date: Fri May 6 12:33:01 2016
New Revision: 268756
URL: http://llvm.org/viewvc/llvm-project?rev=268756&view=rev
Log:
debugserver: fix a few -Wcovered-swift-default warnings
Remove a couple of `default` cases from switches which are covered. This is
beneficial since it would allow the compiler to indicate when a new enum value
is added and the switch is not updated. Fixes some warnings from clang. NFC.
Modified:
lldb/trunk/tools/debugserver/source/DNBDataRef.cpp
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
Modified: lldb/trunk/tools/debugserver/source/DNBDataRef.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBDataRef.cpp?rev=268756&r1=268755&r2=268756&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNBDataRef.cpp (original)
+++ lldb/trunk/tools/debugserver/source/DNBDataRef.cpp Fri May 6 12:33:01 2016
@@ -362,7 +362,6 @@ DNBDataRef::Dump
// the snprintf call each time through this loop
switch (type)
{
- default:
case TypeUInt8: str_offset += snprintf(str + str_offset, sizeof(str) - str_offset, format ? format : " %2.2x", Get8(&offset)); break;
case TypeChar:
{
Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=268756&r1=268755&r2=268756&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Fri May 6 12:33:01 2016
@@ -1026,7 +1026,6 @@ RNBRemote::ThreadFunctionReadRemoteData(
case rnb_success:
break;
- default:
case rnb_err:
DNBLogThreadedIf (LOG_RNB_REMOTE, "RNBSocket::GetCommData returned error %u", err);
done = true;
More information about the lldb-commits
mailing list