Skip to content

Commit

Permalink
[debugserver] Fix sign comparison warning.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
waywardmonkeys committed Sep 1, 2015
1 parent 4aed725 commit dcad05b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion lldb/tools/debugserver/source/MacOSX/MachVMMemory.h
Expand Up @@ -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);
Expand Down

0 comments on commit dcad05b

Please sign in to comment.