Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Unified Diff: src/processor/exploitability_unittest.cc

Issue 1611763002: exploitability_unittest: fix warnings (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/processor/exploitability_unittest.cc
diff --git a/src/processor/exploitability_unittest.cc b/src/processor/exploitability_unittest.cc
index dc5650e3890dd69d8b3ae1b468d3f0ce0a4e8932..ec845bf025b6b6165764b4912f91512ecb082a76 100644
--- a/src/processor/exploitability_unittest.cc
+++ b/src/processor/exploitability_unittest.cc
@@ -194,10 +194,9 @@ TEST(ExploitabilityLinuxUtilsTest, DisassembleBytesTest) {
std::stringstream objdump_stream;
objdump_stream.str(string(buffer));
string line = "";
- while ((line.find("<.data>") == string::npos) &&
- getline(objdump_stream, line)) {
- }
- ASSERT_TRUE(getline(objdump_stream, line));
+ while (line.find("<.data>") == string::npos)
+ getline(objdump_stream, line);
+ getline(objdump_stream, line);
ASSERT_EQ(line, " 0:\tc7 00 05 00 00 00 \tmov DWORD PTR [rax],0x5");
}
@@ -239,17 +238,17 @@ TEST(ExploitabilityLinuxUtilsTest, CalculateAddressTest) {
MDRawContextAMD64 raw_context;
raw_context.rdx = 12345;
ExploitabilityLinuxTestMinidumpContext context(raw_context);
- ASSERT_EQ(context.GetContextAMD64()->rdx, 12345);
+ ASSERT_EQ(context.GetContextAMD64()->rdx, 12345U);
ASSERT_FALSE(ExploitabilityLinuxTest::CalculateAddress("", context, NULL));
uint64_t write_address = 0;
ASSERT_TRUE(ExploitabilityLinuxTest::CalculateAddress("rdx-0x4D2",
context,
&write_address));
- ASSERT_EQ(write_address, 11111);
+ ASSERT_EQ(write_address, 11111U);
ASSERT_TRUE(ExploitabilityLinuxTest::CalculateAddress("rdx+0x4D2",
context,
&write_address));
- ASSERT_EQ(write_address, 13579);
+ ASSERT_EQ(write_address, 13579U);
ASSERT_FALSE(ExploitabilityLinuxTest::CalculateAddress("rdx+rax",
context,
&write_address));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698