[Lldb-commits] [lldb] r217376 - remove a couple of default cases from switches
Saleem Abdulrasool
compnerd at compnerd.org
Mon Sep 8 07:59:37 PDT 2014
Author: compnerd
Date: Mon Sep 8 09:59:36 2014
New Revision: 217376
URL: http://llvm.org/viewvc/llvm-project?rev=217376&view=rev
Log:
remove a couple of default cases from switches
This cleans up a couple of warnings [-Wcovered-switch-default] from the build by
removing the default case from a couple of switches which are fully covered.
This is generally better as it will help identify when a new item is added to
the enumeration but the use sites are not updated.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
lldb/trunk/source/Target/Platform.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp?rev=217376&r1=217375&r2=217376&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp Mon Sep 8 09:59:36 2014
@@ -699,12 +699,18 @@ GDBRemoteCommunicationServer::SendWRespo
char return_type_code;
switch (exit_type)
{
- case ExitType::eExitTypeExit: return_type_code = 'W'; break;
- case ExitType::eExitTypeSignal: return_type_code = 'X'; break;
- case ExitType::eExitTypeStop: return_type_code = 'S'; break;
-
+ case ExitType::eExitTypeExit:
+ return_type_code = 'W';
+ break;
+ case ExitType::eExitTypeSignal:
+ return_type_code = 'X';
+ break;
+ case ExitType::eExitTypeStop:
+ return_type_code = 'S';
+ break;
case ExitType::eExitTypeInvalid:
- default: return_type_code = 'E'; break;
+ return_type_code = 'E';
+ break;
}
response.PutChar (return_type_code);
Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=217376&r1=217375&r2=217376&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Mon Sep 8 09:59:36 2014
@@ -537,7 +537,6 @@ RecurseCopy_Callback (void *baton,
case FileSpec::eFileTypeInvalid:
case FileSpec::eFileTypeOther:
case FileSpec::eFileTypeUnknown:
- default:
rc_baton->error.SetErrorStringWithFormat("invalid file detected during copy: %s", src.GetPath().c_str());
return FileSpec::eEnumerateDirectoryResultQuit; // got an error, bail out
break;
More information about the lldb-commits
mailing list