[Lldb-commits] [lldb] r321120 - Fix a couple of warnings (NFC)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 19 14:54:37 PST 2017
Author: adrian
Date: Tue Dec 19 14:54:37 2017
New Revision: 321120
URL: http://llvm.org/viewvc/llvm-project?rev=321120&view=rev
Log:
Fix a couple of warnings (NFC)
Modified:
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
lldb/trunk/tools/lldb-mi/MIUtilString.cpp
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp?rev=321120&r1=321119&r2=321120&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Tue Dec 19 14:54:37 2017
@@ -98,7 +98,7 @@ bool CommunicationKDP::SendRequestAndGet
#ifdef LLDB_CONFIGURATION_DEBUG
// NOTE: this only works for packets that are in native endian byte order
assert(request_packet.GetSize() ==
- *((uint16_t *)(request_packet.GetData() + 2)));
+ *((const uint16_t *)(request_packet.GetData() + 2)));
#endif
lldb::offset_t offset = 1;
const uint32_t num_retries = 3;
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp?rev=321120&r1=321119&r2=321120&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp Tue Dec 19 14:54:37 2017
@@ -60,6 +60,7 @@ StateType GDBRemoteClientBase::SendConti
continue;
if (steady_clock::now() >= m_interrupt_time + kInterruptTimeout)
return eStateInvalid;
+ break;
}
case PacketResult::Success:
break;
Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp?rev=321120&r1=321119&r2=321120&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp Tue Dec 19 14:54:37 2017
@@ -18,6 +18,7 @@
#include "lldb/API/SBTarget.h"
#include "lldb/API/SBThread.h"
#include "lldb/API/SBUnixSignals.h"
+#include "llvm/Support/Compiler.h"
#ifdef _WIN32
#include <io.h> // For the ::_access()
#else
@@ -899,6 +900,7 @@ bool CMICmnLLDBDebuggerHandleEvents::Han
bOk = HandleProcessEventStateStopped(vEvent, bShouldBrk);
if (bShouldBrk)
break;
+ break;
case lldb::eStateCrashed:
case lldb::eStateSuspended:
pEventType = "eStateSuspended";
Modified: lldb/trunk/tools/lldb-mi/MIUtilString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilString.cpp?rev=321120&r1=321119&r2=321120&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilString.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilString.cpp Tue Dec 19 14:54:37 2017
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// Third party headers
+#include "llvm/Support/Compiler.h"
#include <cstdlib>
#include <inttypes.h> // for PRIx8
#include <limits.h> // for ULONG_MAX
@@ -890,7 +891,7 @@ CMIUtilString CMIUtilString::ConvertToPr
case '"':
if (bEscapeQuotes)
return "\\\"";
- // fall thru
+ LLVM_FALLTHROUGH;
default:
if (::isprint(vChar))
return Format("%c", vChar);
@@ -924,7 +925,7 @@ CMIUtilString::ConvertCharValueToPrintab
case '"':
if (bEscapeQuotes)
return "\\\"";
- // fall thru
+ LLVM_FALLTHROUGH;
default:
if (::isprint(vChar))
return Format("%c", vChar);
More information about the lldb-commits
mailing list