Skip to content

Commit fdb7308

Browse files
enh-googleandroid code review
authored andcommitted
Merge "Use uintptr_t for cast pointer to integer."
2 parents 78f6f9b + ac8ed5e commit fdb7308

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/jdwpspy/Main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "Common.h"
88
#include <stdlib.h>
99
#include <stdio.h>
10+
#include <stdint.h>
1011
#include <string.h>
1112
#include <assert.h>
1213
#include <ctype.h>
@@ -35,15 +36,15 @@ void printHexDumpEx(FILE* fp, const void* vaddr, size_t length,
3536
{
3637
const unsigned char* addr = reinterpret_cast<const unsigned char*>(vaddr);
3738
char out[77]; /* exact fit */
38-
unsigned int offset; /* offset to show while printing */
39+
uintptr_t offset; /* offset to show while printing */
3940
char* hex;
4041
char* asc;
4142
int gap;
4243

4344
if (mode == kHexDumpLocal)
4445
offset = 0;
4546
else
46-
offset = (int) addr;
47+
offset = (uintptr_t) addr;
4748

4849
memset(out, ' ', sizeof(out)-1);
4950
out[8] = ':';

0 commit comments

Comments
 (0)