diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2015-09-01 23:45:14 +0000 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2015-09-01 23:45:14 +0000 |
commit | dcad05b4ebb47073f029b42062d489c08718e473 (patch) | |
tree | 6f9321e4e2bf0bd4a8a098f05ffc177a095100db | |
parent | 4aed72571acd47d2ee1161281a072587adf5b5a6 (diff) | |
download | bcm5719-llvm-dcad05b4ebb47073f029b42062d489c08718e473.tar.gz bcm5719-llvm-dcad05b4ebb47073f029b42062d489c08718e473.zip |
[debugserver] Fix sign comparison warning.
Summary:
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.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12519
llvm-svn: 246606
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp | 2 | ||||
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachVMMemory.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp index ecc8ac4398d..3b86a83024d 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp +++ b/lldb/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) diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.h b/lldb/tools/debugserver/source/MacOSX/MachVMMemory.h index ee5672993e2..abaa20368a2 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.h +++ b/lldb/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); |