aboutsummaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/basic_source_line_resolver_unittest.cc14
-rw-r--r--src/processor/binarystream_unittest.cc40
-rw-r--r--src/processor/disassembler_x86_unittest.cc76
-rw-r--r--src/processor/fast_source_line_resolver_unittest.cc14
-rw-r--r--src/processor/minidump_processor_unittest.cc8
-rw-r--r--src/processor/minidump_stackwalk.cc4
-rw-r--r--src/processor/minidump_unittest.cc8
-rw-r--r--src/processor/module_serializer.h2
-rw-r--r--src/processor/stackwalker_arm_unittest.cc12
-rw-r--r--src/processor/static_map.h2
-rw-r--r--src/processor/static_range_map.h2
11 files changed, 91 insertions, 91 deletions
diff --git a/src/processor/basic_source_line_resolver_unittest.cc b/src/processor/basic_source_line_resolver_unittest.cc
index 2a483e35..bf8507ae 100644
--- a/src/processor/basic_source_line_resolver_unittest.cc
+++ b/src/processor/basic_source_line_resolver_unittest.cc
@@ -184,20 +184,20 @@ TEST_F(TestBasicSourceLineResolver, TestLoadAndResolve)
resolver.FillSourceLineInfo(&frame);
ASSERT_FALSE(frame.module);
ASSERT_TRUE(frame.function_name.empty());
- ASSERT_EQ(frame.function_base, 0);
+ ASSERT_EQ(frame.function_base, 0U);
ASSERT_TRUE(frame.source_file_name.empty());
ASSERT_EQ(frame.source_line, 0);
- ASSERT_EQ(frame.source_line_base, 0);
+ ASSERT_EQ(frame.source_line_base, 0U);
frame.module = &module1;
resolver.FillSourceLineInfo(&frame);
ASSERT_EQ(frame.function_name, "Function1_1");
ASSERT_TRUE(frame.module);
ASSERT_EQ(frame.module->code_file(), "module1");
- ASSERT_EQ(frame.function_base, 0x1000);
+ ASSERT_EQ(frame.function_base, 0x1000U);
ASSERT_EQ(frame.source_file_name, "file1_1.cc");
ASSERT_EQ(frame.source_line, 44);
- ASSERT_EQ(frame.source_line_base, 0x1000);
+ ASSERT_EQ(frame.source_line_base, 0x1000U);
windows_frame_info.reset(resolver.FindWindowsFrameInfo(&frame));
ASSERT_TRUE(windows_frame_info.get());
ASSERT_EQ(windows_frame_info->type_, WindowsFrameInfo::STACK_INFO_FRAME_DATA);
@@ -346,16 +346,16 @@ TEST_F(TestBasicSourceLineResolver, TestLoadAndResolve)
frame.module = &module2;
resolver.FillSourceLineInfo(&frame);
ASSERT_EQ(frame.function_name, "Function2_2");
- ASSERT_EQ(frame.function_base, 0x2170);
+ ASSERT_EQ(frame.function_base, 0x2170U);
ASSERT_TRUE(frame.module);
ASSERT_EQ(frame.module->code_file(), "module2");
ASSERT_EQ(frame.source_file_name, "file2_2.cc");
ASSERT_EQ(frame.source_line, 21);
- ASSERT_EQ(frame.source_line_base, 0x2180);
+ ASSERT_EQ(frame.source_line_base, 0x2180U);
windows_frame_info.reset(resolver.FindWindowsFrameInfo(&frame));
ASSERT_TRUE(windows_frame_info.get());
ASSERT_EQ(windows_frame_info->type_, WindowsFrameInfo::STACK_INFO_FRAME_DATA);
- ASSERT_EQ(windows_frame_info->prolog_size, 1);
+ ASSERT_EQ(windows_frame_info->prolog_size, 1U);
frame.instruction = 0x216f;
resolver.FillSourceLineInfo(&frame);
diff --git a/src/processor/binarystream_unittest.cc b/src/processor/binarystream_unittest.cc
index 2812319c..8a3daa37 100644
--- a/src/processor/binarystream_unittest.cc
+++ b/src/processor/binarystream_unittest.cc
@@ -51,7 +51,7 @@ TEST_F(BinaryStreamBasicTest, ReadU8) {
ASSERT_FALSE(stream.eof());
stream >> u8;
ASSERT_TRUE(stream.eof());
- EXPECT_EQ(0, u8);
+ EXPECT_EQ(0U, u8);
stream.rewind();
stream.clear();
stream << (u_int8_t)1;
@@ -66,7 +66,7 @@ TEST_F(BinaryStreamBasicTest, ReadU16) {
ASSERT_FALSE(stream.eof());
stream >> u16;
ASSERT_TRUE(stream.eof());
- EXPECT_EQ(0, u16);
+ EXPECT_EQ(0U, u16);
stream.rewind();
stream.clear();
stream << (u_int16_t)1;
@@ -81,13 +81,13 @@ TEST_F(BinaryStreamBasicTest, ReadU32) {
ASSERT_FALSE(stream.eof());
stream >> u32;
ASSERT_TRUE(stream.eof());
- EXPECT_EQ(0, u32);
+ EXPECT_EQ(0U, u32);
stream.rewind();
stream.clear();
stream << (u_int32_t)1;
ASSERT_FALSE(stream.eof());
stream >> u32;
- EXPECT_EQ(1, u32);
+ EXPECT_EQ(1U, u32);
EXPECT_FALSE(stream.eof());
}
@@ -96,13 +96,13 @@ TEST_F(BinaryStreamBasicTest, ReadU64) {
ASSERT_FALSE(stream.eof());
stream >> u64;
ASSERT_TRUE(stream.eof());
- EXPECT_EQ(0, u64);
+ EXPECT_EQ(0U, u64);
stream.rewind();
stream.clear();
stream << (u_int64_t)1;
ASSERT_FALSE(stream.eof());
stream >> u64;
- EXPECT_EQ(1, u64);
+ EXPECT_EQ(1U, u64);
EXPECT_FALSE(stream.eof());
}
@@ -149,7 +149,7 @@ TEST_F(BinaryStreamBasicTest, ReadMultiU8) {
ASSERT_FALSE(stream.eof());
e = 0;
stream >> e;
- EXPECT_EQ(0, e);
+ EXPECT_EQ(0U, e);
ASSERT_TRUE(stream.eof());
// try reading all at once, including one past eof
stream.rewind();
@@ -162,7 +162,7 @@ TEST_F(BinaryStreamBasicTest, ReadMultiU8) {
EXPECT_EQ(eb, b);
EXPECT_EQ(ec, c);
EXPECT_EQ(ed, d);
- EXPECT_EQ(0, e);
+ EXPECT_EQ(0U, e);
EXPECT_TRUE(stream.eof());
}
@@ -179,7 +179,7 @@ TEST_F(BinaryStreamBasicTest, ReadMultiU16) {
ASSERT_FALSE(stream.eof());
e = 0;
stream >> e;
- EXPECT_EQ(0, e);
+ EXPECT_EQ(0U, e);
EXPECT_TRUE(stream.eof());
// try reading all at once, including one past eof
stream.rewind();
@@ -192,7 +192,7 @@ TEST_F(BinaryStreamBasicTest, ReadMultiU16) {
EXPECT_EQ(eb, b);
EXPECT_EQ(ec, c);
EXPECT_EQ(ed, d);
- EXPECT_EQ(0, e);
+ EXPECT_EQ(0U, e);
EXPECT_TRUE(stream.eof());
}
@@ -209,7 +209,7 @@ TEST_F(BinaryStreamBasicTest, ReadMultiU32) {
ASSERT_FALSE(stream.eof());
e = 0;
stream >> e;
- EXPECT_EQ(0, e);
+ EXPECT_EQ(0U, e);
EXPECT_TRUE(stream.eof());
// try reading all at once, including one past eof
stream.rewind();
@@ -222,7 +222,7 @@ TEST_F(BinaryStreamBasicTest, ReadMultiU32) {
EXPECT_EQ(eb, b);
EXPECT_EQ(ec, c);
EXPECT_EQ(ed, d);
- EXPECT_EQ(0, e);
+ EXPECT_EQ(0U, e);
EXPECT_TRUE(stream.eof());
}
@@ -240,7 +240,7 @@ TEST_F(BinaryStreamBasicTest, ReadMultiU64) {
ASSERT_FALSE(stream.eof());
e = 0;
stream >> e;
- EXPECT_EQ(0, e);
+ EXPECT_EQ(0U, e);
EXPECT_TRUE(stream.eof());
// try reading all at once, including one past eof
stream.rewind();
@@ -253,7 +253,7 @@ TEST_F(BinaryStreamBasicTest, ReadMultiU64) {
EXPECT_EQ(eb, b);
EXPECT_EQ(ec, c);
EXPECT_EQ(ed, d);
- EXPECT_EQ(0, e);
+ EXPECT_EQ(0U, e);
EXPECT_TRUE(stream.eof());
}
@@ -306,7 +306,7 @@ TEST_F(BinaryStreamBasicTest, StreamByteLength) {
stream << (u_int8_t)0 << (u_int16_t)1 << (u_int32_t)2 << (u_int64_t)3
<< string("test");
string s = stream.str();
- EXPECT_EQ(21, s.length());
+ EXPECT_EQ(21U, s.length());
}
TEST_F(BinaryStreamBasicTest, AppendStreamResultsByteLength) {
@@ -319,7 +319,7 @@ TEST_F(BinaryStreamBasicTest, AppendStreamResultsByteLength) {
string s = stream.str();
string s2 = stream2.str();
s.append(s2);
- EXPECT_EQ(21, s.length());
+ EXPECT_EQ(21U, s.length());
}
TEST_F(BinaryStreamBasicTest, StreamSetStr) {
@@ -353,7 +353,7 @@ TEST_F(BinaryStreamU8Test, ReadU16) {
ASSERT_FALSE(stream.eof());
stream >> u16;
ASSERT_TRUE(stream.eof());
- EXPECT_EQ(0, u16);
+ EXPECT_EQ(0U, u16);
}
TEST_F(BinaryStreamU8Test, ReadU32) {
@@ -361,7 +361,7 @@ TEST_F(BinaryStreamU8Test, ReadU32) {
ASSERT_FALSE(stream.eof());
stream >> u32;
ASSERT_TRUE(stream.eof());
- EXPECT_EQ(0, u32);
+ EXPECT_EQ(0U, u32);
}
TEST_F(BinaryStreamU8Test, ReadU64) {
@@ -369,7 +369,7 @@ TEST_F(BinaryStreamU8Test, ReadU64) {
ASSERT_FALSE(stream.eof());
stream >> u64;
ASSERT_TRUE(stream.eof());
- EXPECT_EQ(0, u64);
+ EXPECT_EQ(0U, u64);
}
TEST_F(BinaryStreamU8Test, ReadString) {
@@ -399,7 +399,7 @@ TEST(BinaryStreamTest, InitWithDataLeadingNull) {
u_int8_t z, a, b, c, d;
stream >> z >> a >> b >> c >> d;
ASSERT_FALSE(stream.eof());
- EXPECT_EQ(0, z);
+ EXPECT_EQ(0U, z);
EXPECT_EQ('a', a);
EXPECT_EQ('b', b);
EXPECT_EQ('c', c);
diff --git a/src/processor/disassembler_x86_unittest.cc b/src/processor/disassembler_x86_unittest.cc
index 7d507ee9..b43dab04 100644
--- a/src/processor/disassembler_x86_unittest.cc
+++ b/src/processor/disassembler_x86_unittest.cc
@@ -91,39 +91,39 @@ unsigned char read_cmp[] =
TEST(DisassemblerX86Test, SimpleReturnInstruction) {
DisassemblerX86 dis(just_return, sizeof(just_return)-1, 0);
- EXPECT_EQ(1, dis.NextInstruction());
+ EXPECT_EQ(1U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_TRUE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_controlflow, dis.currentInstructionGroup());
const libdis::x86_insn_t* instruction = dis.currentInstruction();
EXPECT_EQ(libdis::insn_controlflow, instruction->group);
EXPECT_EQ(libdis::insn_return, instruction->type);
- EXPECT_EQ(0, dis.NextInstruction());
+ EXPECT_EQ(0U, dis.NextInstruction());
EXPECT_FALSE(dis.currentInstructionValid());
EXPECT_EQ(NULL, dis.currentInstruction());
}
TEST(DisassemblerX86Test, SimpleInvalidInstruction) {
DisassemblerX86 dis(invalid_instruction, sizeof(invalid_instruction)-1, 0);
- EXPECT_EQ(0, dis.NextInstruction());
+ EXPECT_EQ(0U, dis.NextInstruction());
EXPECT_FALSE(dis.currentInstructionValid());
}
TEST(DisassemblerX86Test, BadReadLeadsToBranch) {
DisassemblerX86 dis(read_eax_jmp_eax, sizeof(read_eax_jmp_eax)-1, 0);
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup());
EXPECT_TRUE(dis.setBadRead());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_logic, dis.currentInstructionGroup());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
EXPECT_EQ(google_breakpad::DISX86_BAD_BRANCH_TARGET, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
@@ -133,22 +133,22 @@ TEST(DisassemblerX86Test, BadReadLeadsToBranch) {
TEST(DisassemblerX86Test, BadWriteLeadsToPushedArg) {
DisassemblerX86 dis(write_eax_arg_to_call,
sizeof(write_eax_arg_to_call)-1, 0);
- EXPECT_EQ(6, dis.NextInstruction());
+ EXPECT_EQ(6U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup());
EXPECT_TRUE(dis.setBadWrite());
- EXPECT_EQ(3, dis.NextInstruction());
+ EXPECT_EQ(3U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_arithmetic, dis.currentInstructionGroup());
- EXPECT_EQ(1, dis.NextInstruction());
+ EXPECT_EQ(1U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
- EXPECT_EQ(5, dis.NextInstruction());
+ EXPECT_EQ(5U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
EXPECT_EQ(google_breakpad::DISX86_BAD_ARGUMENT_PASSED, dis.flags());
EXPECT_EQ(libdis::insn_controlflow, dis.currentInstructionGroup());
@@ -158,18 +158,18 @@ TEST(DisassemblerX86Test, BadWriteLeadsToPushedArg) {
TEST(DisassemblerX86Test, BadReadLeadsToBlockWrite) {
DisassemblerX86 dis(read_edi_stosb, sizeof(read_edi_stosb)-1, 0);
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup());
EXPECT_TRUE(dis.setBadRead());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
EXPECT_EQ(google_breakpad::DISX86_BAD_BLOCK_WRITE, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
@@ -178,43 +178,43 @@ TEST(DisassemblerX86Test, BadReadLeadsToBlockWrite) {
TEST(DisassemblerX86Test, BadReadClobberThenWrite) {
DisassemblerX86 dis(read_clobber_write, sizeof(read_clobber_write)-1, 0);
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_arithmetic, dis.currentInstructionGroup());
EXPECT_TRUE(dis.setBadRead());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup());
}
TEST(DisassemblerX86Test, BadReadXCHGThenWrite) {
DisassemblerX86 dis(read_xchg_write, sizeof(read_xchg_write)-1, 0);
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_arithmetic, dis.currentInstructionGroup());
EXPECT_TRUE(dis.setBadRead());
- EXPECT_EQ(1, dis.NextInstruction());
+ EXPECT_EQ(1U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
EXPECT_EQ(google_breakpad::DISX86_BAD_WRITE, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
@@ -223,18 +223,18 @@ TEST(DisassemblerX86Test, BadReadXCHGThenWrite) {
TEST(DisassemblerX86Test, BadReadThenCMP) {
DisassemblerX86 dis(read_cmp, sizeof(read_cmp)-1, 0);
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
- EXPECT_EQ(0, dis.flags());
+ EXPECT_EQ(0U, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_arithmetic, dis.currentInstructionGroup());
EXPECT_TRUE(dis.setBadRead());
- EXPECT_EQ(3, dis.NextInstruction());
+ EXPECT_EQ(3U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
EXPECT_EQ(google_breakpad::DISX86_BAD_COMPARISON, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
EXPECT_EQ(libdis::insn_comparison, dis.currentInstructionGroup());
- EXPECT_EQ(2, dis.NextInstruction());
+ EXPECT_EQ(2U, dis.NextInstruction());
EXPECT_TRUE(dis.currentInstructionValid());
EXPECT_EQ(google_breakpad::DISX86_BAD_COMPARISON, dis.flags());
EXPECT_FALSE(dis.endOfBlock());
diff --git a/src/processor/fast_source_line_resolver_unittest.cc b/src/processor/fast_source_line_resolver_unittest.cc
index d0323cea..c982c541 100644
--- a/src/processor/fast_source_line_resolver_unittest.cc
+++ b/src/processor/fast_source_line_resolver_unittest.cc
@@ -213,20 +213,20 @@ TEST_F(TestFastSourceLineResolver, TestLoadAndResolve) {
fast_resolver.FillSourceLineInfo(&frame);
ASSERT_FALSE(frame.module);
ASSERT_TRUE(frame.function_name.empty());
- ASSERT_EQ(frame.function_base, 0);
+ ASSERT_EQ(frame.function_base, 0U);
ASSERT_TRUE(frame.source_file_name.empty());
ASSERT_EQ(frame.source_line, 0);
- ASSERT_EQ(frame.source_line_base, 0);
+ ASSERT_EQ(frame.source_line_base, 0U);
frame.module = &module1;
fast_resolver.FillSourceLineInfo(&frame);
ASSERT_EQ(frame.function_name, "Function1_1");
ASSERT_TRUE(frame.module);
ASSERT_EQ(frame.module->code_file(), "module1");
- ASSERT_EQ(frame.function_base, 0x1000);
+ ASSERT_EQ(frame.function_base, 0x1000U);
ASSERT_EQ(frame.source_file_name, "file1_1.cc");
ASSERT_EQ(frame.source_line, 44);
- ASSERT_EQ(frame.source_line_base, 0x1000);
+ ASSERT_EQ(frame.source_line_base, 0x1000U);
windows_frame_info.reset(fast_resolver.FindWindowsFrameInfo(&frame));
ASSERT_TRUE(windows_frame_info.get());
ASSERT_FALSE(windows_frame_info->allocates_base_pointer);
@@ -374,16 +374,16 @@ TEST_F(TestFastSourceLineResolver, TestLoadAndResolve) {
frame.module = &module2;
fast_resolver.FillSourceLineInfo(&frame);
ASSERT_EQ(frame.function_name, "Function2_2");
- ASSERT_EQ(frame.function_base, 0x2170);
+ ASSERT_EQ(frame.function_base, 0x2170U);
ASSERT_TRUE(frame.module);
ASSERT_EQ(frame.module->code_file(), "module2");
ASSERT_EQ(frame.source_file_name, "file2_2.cc");
ASSERT_EQ(frame.source_line, 21);
- ASSERT_EQ(frame.source_line_base, 0x2180);
+ ASSERT_EQ(frame.source_line_base, 0x2180U);
windows_frame_info.reset(fast_resolver.FindWindowsFrameInfo(&frame));
ASSERT_TRUE(windows_frame_info.get());
ASSERT_EQ(windows_frame_info->type_, WindowsFrameInfo::STACK_INFO_FRAME_DATA);
- ASSERT_EQ(windows_frame_info->prolog_size, 1);
+ ASSERT_EQ(windows_frame_info->prolog_size, 1U);
frame.instruction = 0x216f;
fast_resolver.FillSourceLineInfo(&frame);
diff --git a/src/processor/minidump_processor_unittest.cc b/src/processor/minidump_processor_unittest.cc
index db96efb7..917caaf4 100644
--- a/src/processor/minidump_processor_unittest.cc
+++ b/src/processor/minidump_processor_unittest.cc
@@ -492,8 +492,8 @@ TEST_F(MinidumpProcessorTest, TestThreadMissingMemory) {
google_breakpad::PROCESS_OK);
// Should have a single thread with a single frame in it.
- ASSERT_EQ(1, state.threads()->size());
- ASSERT_EQ(1, state.threads()->at(0)->frames()->size());
+ ASSERT_EQ(1U, state.threads()->size());
+ ASSERT_EQ(1U, state.threads()->at(0)->frames()->size());
ASSERT_EQ(kExpectedEIP, state.threads()->at(0)->frames()->at(0)->instruction);
}
@@ -543,8 +543,8 @@ TEST_F(MinidumpProcessorTest, TestThreadMissingContext) {
google_breakpad::PROCESS_OK);
// Should have a single thread with zero frames.
- ASSERT_EQ(1, state.threads()->size());
- ASSERT_EQ(0, state.threads()->at(0)->frames()->size());
+ ASSERT_EQ(1U, state.threads()->size());
+ ASSERT_EQ(0U, state.threads()->at(0)->frames()->size());
}
} // namespace
diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc
index 2ff7a57c..b3137d97 100644
--- a/src/processor/minidump_stackwalk.cc
+++ b/src/processor/minidump_stackwalk.cc
@@ -88,7 +88,7 @@ static int PrintRegister(const char *name, u_int32_t value, int start_col) {
char buffer[64];
snprintf(buffer, sizeof(buffer), " %5s = 0x%08x", name, value);
- if (start_col + strlen(buffer) > kMaxWidth) {
+ if (start_col + static_cast<ssize_t>(strlen(buffer)) > kMaxWidth) {
start_col = 0;
printf("\n ");
}
@@ -102,7 +102,7 @@ static int PrintRegister64(const char *name, u_int64_t value, int start_col) {
char buffer[64];
snprintf(buffer, sizeof(buffer), " %5s = 0x%016" PRIx64 , name, value);
- if (start_col + strlen(buffer) > kMaxWidth) {
+ if (start_col + static_cast<ssize_t>(strlen(buffer)) > kMaxWidth) {
start_col = 0;
printf("\n ");
}
diff --git a/src/processor/minidump_unittest.cc b/src/processor/minidump_unittest.cc
index eb203ec6..1faf169d 100644
--- a/src/processor/minidump_unittest.cc
+++ b/src/processor/minidump_unittest.cc
@@ -726,7 +726,7 @@ TEST(Dump, OneExceptionX86) {
u_int32_t thread_id;
ASSERT_TRUE(md_exception->GetThreadID(&thread_id));
- ASSERT_EQ(0x1234abcd, thread_id);
+ ASSERT_EQ(0x1234abcdU, thread_id);
const MDRawExceptionStream* raw_exception = md_exception->exception();
ASSERT_TRUE(raw_exception != NULL);
@@ -800,7 +800,7 @@ TEST(Dump, OneExceptionX86XState) {
u_int32_t thread_id;
ASSERT_TRUE(md_exception->GetThreadID(&thread_id));
- ASSERT_EQ(0x1234abcd, thread_id);
+ ASSERT_EQ(0x1234abcdU, thread_id);
const MDRawExceptionStream* raw_exception = md_exception->exception();
ASSERT_TRUE(raw_exception != NULL);
@@ -878,7 +878,7 @@ TEST(Dump, OneExceptionARM) {
u_int32_t thread_id;
ASSERT_TRUE(md_exception->GetThreadID(&thread_id));
- ASSERT_EQ(0x1234abcd, thread_id);
+ ASSERT_EQ(0x1234abcdU, thread_id);
const MDRawExceptionStream* raw_exception = md_exception->exception();
ASSERT_TRUE(raw_exception != NULL);
@@ -962,7 +962,7 @@ TEST(Dump, OneExceptionARMOldFlags) {
u_int32_t thread_id;
ASSERT_TRUE(md_exception->GetThreadID(&thread_id));
- ASSERT_EQ(0x1234abcd, thread_id);
+ ASSERT_EQ(0x1234abcdU, thread_id);
const MDRawExceptionStream* raw_exception = md_exception->exception();
ASSERT_TRUE(raw_exception != NULL);
diff --git a/src/processor/module_serializer.h b/src/processor/module_serializer.h
index 3b440a60..91e913b4 100644
--- a/src/processor/module_serializer.h
+++ b/src/processor/module_serializer.h
@@ -106,7 +106,7 @@ class ModuleSerializer {
FastSourceLineResolver *fast_resolver);
// Number of Maps that Module class contains.
- static const u_int32_t kNumberMaps_ =
+ static const int32_t kNumberMaps_ =
FastSourceLineResolver::Module::kNumberMaps_;
// Memory sizes required to serialize map components in Module.
diff --git a/src/processor/stackwalker_arm_unittest.cc b/src/processor/stackwalker_arm_unittest.cc
index e5988f41..4c2ca047 100644
--- a/src/processor/stackwalker_arm_unittest.cc
+++ b/src/processor/stackwalker_arm_unittest.cc
@@ -293,7 +293,7 @@ TEST_F(GetCallerFrame, ScanWithFunctionSymbols) {
ASSERT_EQ(StackFrameARM::CONTEXT_VALID_ALL, frame0->context_validity);
EXPECT_EQ(0, memcmp(&raw_context, &frame0->context, sizeof(raw_context)));
EXPECT_EQ("monotreme", frame0->function_name);
- EXPECT_EQ(0x40000100, frame0->function_base);
+ EXPECT_EQ(0x40000100U, frame0->function_base);
StackFrameARM *frame1 = static_cast<StackFrameARM *>(frames->at(1));
EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame1->trust);
@@ -303,7 +303,7 @@ TEST_F(GetCallerFrame, ScanWithFunctionSymbols) {
EXPECT_EQ(return_address, frame1->context.iregs[MD_CONTEXT_ARM_REG_PC]);
EXPECT_EQ(frame1_sp.Value(), frame1->context.iregs[MD_CONTEXT_ARM_REG_SP]);
EXPECT_EQ("marsupial", frame1->function_name);
- EXPECT_EQ(0x50000100, frame1->function_base);
+ EXPECT_EQ(0x50000100U, frame1->function_base);
}
struct CFIFixture: public StackwalkerARMFixture {
@@ -688,9 +688,9 @@ TEST_F(GetFramesByFramePointer, OnlyFramePointer) {
StackFrameARM::CONTEXT_VALID_SP),
frame2->context_validity);
EXPECT_EQ(return_address2, frame2->context.iregs[MD_CONTEXT_ARM_REG_PC]);
- EXPECT_EQ(0, frame2->context.iregs[MD_CONTEXT_ARM_REG_LR]);
+ EXPECT_EQ(0U, frame2->context.iregs[MD_CONTEXT_ARM_REG_LR]);
EXPECT_EQ(frame2_sp.Value(), frame2->context.iregs[MD_CONTEXT_ARM_REG_SP]);
- EXPECT_EQ(0, frame2->context.iregs[MD_CONTEXT_ARM_REG_IOS_FP]);
+ EXPECT_EQ(0U, frame2->context.iregs[MD_CONTEXT_ARM_REG_IOS_FP]);
}
TEST_F(GetFramesByFramePointer, FramePointerAndCFI) {
@@ -781,7 +781,7 @@ TEST_F(GetFramesByFramePointer, FramePointerAndCFI) {
StackFrameARM::CONTEXT_VALID_SP),
frame2->context_validity);
EXPECT_EQ(return_address2, frame2->context.iregs[MD_CONTEXT_ARM_REG_PC]);
- EXPECT_EQ(0, frame2->context.iregs[MD_CONTEXT_ARM_REG_LR]);
+ EXPECT_EQ(0U, frame2->context.iregs[MD_CONTEXT_ARM_REG_LR]);
EXPECT_EQ(frame2_sp.Value(), frame2->context.iregs[MD_CONTEXT_ARM_REG_SP]);
- EXPECT_EQ(0, frame2->context.iregs[MD_CONTEXT_ARM_REG_IOS_FP]);
+ EXPECT_EQ(0U, frame2->context.iregs[MD_CONTEXT_ARM_REG_IOS_FP]);
}
diff --git a/src/processor/static_map.h b/src/processor/static_map.h
index 023ab3a4..15a5573b 100644
--- a/src/processor/static_map.h
+++ b/src/processor/static_map.h
@@ -126,7 +126,7 @@ class StaticMap {
const char* raw_data_;
// Number of nodes in the static map.
- u_int32_t num_nodes_;
+ int32_t num_nodes_;
// Array of offset addresses for stored values.
// For example:
diff --git a/src/processor/static_range_map.h b/src/processor/static_range_map.h
index 096bbbba..91aabb03 100644
--- a/src/processor/static_range_map.h
+++ b/src/processor/static_range_map.h
@@ -79,7 +79,7 @@ class StaticRangeMap {
const;
// Returns the number of ranges stored in the RangeMap.
- inline unsigned int GetCount() const { return map_.size(); }
+ inline int GetCount() const { return map_.size(); }
private:
friend class ModuleComparer;