Remove some lint.
Change-Id: Ieecd7c10e62bce27e2db38f96d5df9782ef0cff6
diff --git a/src/hprof/hprof.cc b/src/hprof/hprof.cc
index 47d31fc..3c5227f 100644
--- a/src/hprof/hprof.cc
+++ b/src/hprof/hprof.cc
@@ -49,7 +49,7 @@
/*
* Initialize an Hprof.
*/
-Hprof::Hprof(const char *outputFileName, int fd, bool writeHeader, bool directToDdms)
+Hprof::Hprof(const char* outputFileName, int fd, bool writeHeader, bool directToDdms)
: current_record_(),
gc_thread_serial_number_(0),
gc_scan_state_(0),
@@ -78,7 +78,7 @@
fd_ = fd;
current_record_.alloc_length_ = 128;
- current_record_.body_ = (unsigned char *)malloc(current_record_.alloc_length_);
+ current_record_.body_ = (unsigned char*)malloc(current_record_.alloc_length_);
// TODO check for/return an error
if (writeHeader) {
@@ -147,7 +147,7 @@
// The ID for the synthetic object generated to account for class static overhead.
#define CLASS_STATICS_ID(clazz) ((HprofObjectId)(((uint32_t)(clazz)) | 1))
-HprofBasicType Hprof::SignatureToBasicTypeAndSize(const char *sig, size_t *sizeOut) {
+HprofBasicType Hprof::SignatureToBasicTypeAndSize(const char* sig, size_t* sizeOut) {
char c = sig[0];
HprofBasicType ret;
size_t size;
diff --git a/src/hprof/hprof.h b/src/hprof/hprof.h
index 7378ec9..e999dce 100644
--- a/src/hprof/hprof.h
+++ b/src/hprof/hprof.h
@@ -39,7 +39,7 @@
#define U2_TO_BUF_BE(buf, offset, value) \
do { \
- unsigned char *buf_ = (unsigned char *)(buf); \
+ unsigned char* buf_ = (unsigned char*)(buf); \
int offset_ = (int)(offset); \
uint16_t value_ = (uint16_t)(value); \
buf_[offset_ + 0] = (unsigned char)(value_ >> 8); \
@@ -48,7 +48,7 @@
#define U4_TO_BUF_BE(buf, offset, value) \
do { \
- unsigned char *buf_ = (unsigned char *)(buf); \
+ unsigned char* buf_ = (unsigned char*)(buf); \
int offset_ = (int)(offset); \
uint32_t value_ = (uint32_t)(value); \
buf_[offset_ + 0] = (unsigned char)(value_ >> 24); \
@@ -59,7 +59,7 @@
#define U8_TO_BUF_BE(buf, offset, value) \
do { \
- unsigned char *buf_ = (unsigned char *)(buf); \
+ unsigned char* buf_ = (unsigned char*)(buf); \
int offset_ = (int)(offset); \
uint64_t value_ = (uint64_t)(value); \
buf_[offset_ + 0] = (unsigned char)(value_ >> 56); \
@@ -157,9 +157,9 @@
int AddU4List(const uint32_t *values, size_t numValues);
int AddU8List(const uint64_t *values, size_t numValues);
int AddIdList(const HprofObjectId *values, size_t numValues);
- int AddUtf8String(const char *str);
+ int AddUtf8String(const char* str);
- unsigned char *body_;
+ unsigned char* body_;
uint32_t time_;
uint32_t length_;
size_t alloc_length_;
@@ -178,7 +178,7 @@
class Hprof {
public:
- Hprof(const char *outputFileName, int fd, bool writeHeader, bool directToDdms);
+ Hprof(const char* outputFileName, int fd, bool writeHeader, bool directToDdms);
~Hprof();
void VisitRoot(const Object* obj);
@@ -196,8 +196,8 @@
HprofStringId LookupStringId(const char* string);
HprofStringId LookupStringId(std::string string);
HprofStringId LookupClassNameId(Class* clazz);
- static HprofBasicType SignatureToBasicTypeAndSize(const char *sig, size_t *sizeOut);
- static HprofBasicType PrimitiveToBasicTypeAndSize(Primitive::Type prim, size_t *sizeOut);
+ static HprofBasicType SignatureToBasicTypeAndSize(const char* sig, size_t* sizeOut);
+ static HprofBasicType PrimitiveToBasicTypeAndSize(Primitive::Type prim, size_t* sizeOut);
static int StackTraceSerialNumber(const void *obj);
// current_record_ *must* be first so that we can cast from a context to a record.
@@ -212,8 +212,8 @@
// Otherwise, "file_name_" must be valid, though if "fd" >= 0 it will
// only be used for debug messages.
bool direct_to_ddms_;
- char *file_name_;
- char *file_data_ptr_; // for open_memstream
+ char* file_name_;
+ char* file_data_ptr_; // for open_memstream
size_t file_data_size_; // for open_memstream
FILE *mem_fp_;
int fd_;
diff --git a/src/hprof/hprof_record.cc b/src/hprof/hprof_record.cc
index 1813a44..ad4b43c 100644
--- a/src/hprof/hprof_record.cc
+++ b/src/hprof/hprof_record.cc
@@ -55,7 +55,7 @@
if (newAllocLen < minSize) {
newAllocLen = alloc_length_ + nmore + nmore/2;
}
- unsigned char *newBody = (unsigned char *)realloc(body_, newAllocLen);
+ unsigned char* newBody = (unsigned char*)realloc(body_, newAllocLen);
if (newBody != NULL) {
body_ = newBody;
alloc_length_ = newAllocLen;
@@ -90,7 +90,7 @@
return 0;
}
-int HprofRecord::AddUtf8String(const char *str) {
+int HprofRecord::AddUtf8String(const char* str) {
// The terminating NUL character is NOT written.
return AddU1List((const uint8_t *)str, strlen(str));
}
@@ -101,7 +101,7 @@
return err;
}
- unsigned char *insert = body_ + length_;
+ unsigned char* insert = body_ + length_;
for (size_t i = 0; i < numValues; i++) {
U2_TO_BUF_BE(insert, 0, *values++);
insert += sizeof(*values);
@@ -124,7 +124,7 @@
return err;
}
- unsigned char *insert = body_ + length_;
+ unsigned char* insert = body_ + length_;
for (size_t i = 0; i < numValues; i++) {
U4_TO_BUF_BE(insert, 0, *values++);
insert += sizeof(*values);
@@ -147,7 +147,7 @@
return err;
}
- unsigned char *insert = body_ + length_;
+ unsigned char* insert = body_ + length_;
for (size_t i = 0; i < numValues; i++) {
U8_TO_BUF_BE(insert, 0, *values++);
insert += sizeof(*values);