am fdb7308b: Merge "Use uintptr_t for cast pointer to integer."

* commit 'fdb7308bb75e503486be134103d1260aadec8cae':
  Use uintptr_t for cast pointer to integer.
This commit is contained in:
Elliott Hughes
2012-08-06 13:22:05 -07:00
committed by Android Git Automerger

View File

@@ -7,6 +7,7 @@
#include "Common.h" #include "Common.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
@@ -35,7 +36,7 @@ void printHexDumpEx(FILE* fp, const void* vaddr, size_t length,
{ {
const unsigned char* addr = reinterpret_cast<const unsigned char*>(vaddr); const unsigned char* addr = reinterpret_cast<const unsigned char*>(vaddr);
char out[77]; /* exact fit */ char out[77]; /* exact fit */
unsigned int offset; /* offset to show while printing */ uintptr_t offset; /* offset to show while printing */
char* hex; char* hex;
char* asc; char* asc;
int gap; int gap;
@@ -43,7 +44,7 @@ void printHexDumpEx(FILE* fp, const void* vaddr, size_t length,
if (mode == kHexDumpLocal) if (mode == kHexDumpLocal)
offset = 0; offset = 0;
else else
offset = (int) addr; offset = (uintptr_t) addr;
memset(out, ' ', sizeof(out)-1); memset(out, ' ', sizeof(out)-1);
out[8] = ':'; out[8] = ':';