[Lldb-commits] [PATCH] D12519: [debugserver] Fix sign comparison warning.
Bruce Mitchener via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 31 22:51:13 PDT 2015
brucem created this revision.
brucem added a reviewer: clayborg.
brucem added a subscriber: lldb-commits.
Comparing m_page_size against kInvalidPageSize was resulting in
a warning about comparing integers with different signs. Since
kInvalidPageSize isn't used anywhere outside of MachVMMemory.cpp,
we can readily transform it into a static const vm_size_t with
the correct value to avoid the sign comparison warnings.
http://reviews.llvm.org/D12519
Files:
tools/debugserver/source/MacOSX/MachVMMemory.cpp
tools/debugserver/source/MacOSX/MachVMMemory.h
Index: tools/debugserver/source/MacOSX/MachVMMemory.h
===================================================================
--- tools/debugserver/source/MacOSX/MachVMMemory.h
+++ tools/debugserver/source/MacOSX/MachVMMemory.h
@@ -21,7 +21,6 @@
class MachVMMemory
{
public:
- enum { kInvalidPageSize = ~0 };
MachVMMemory();
~MachVMMemory();
nub_size_t Read(task_t task, nub_addr_t address, void *data, nub_size_t data_count);
Index: tools/debugserver/source/MacOSX/MachVMMemory.cpp
===================================================================
--- tools/debugserver/source/MacOSX/MachVMMemory.cpp
+++ tools/debugserver/source/MacOSX/MachVMMemory.cpp
@@ -19,6 +19,8 @@
#include <sys/sysctl.h>
#include <dlfcn.h>
+static const vm_size_t kInvalidPageSize = ~0;
+
MachVMMemory::MachVMMemory() :
m_page_size (kInvalidPageSize),
m_err (0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12519.33666.patch
Type: text/x-patch
Size: 882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150901/e280d84e/attachment.bin>
More information about the lldb-commits
mailing list