Fix some -Werror=sign-compare errors
R=svenpanne@chromium.org LOG=N BUG= Review URL: https://codereview.chromium.org/1072333002 Cr-Commit-Position: refs/heads/master@{#27752}
This commit is contained in:
parent
4bd9bdbb28
commit
fe031978cb
@ -41,7 +41,7 @@ inline int WhichPowerOf2(uint32_t x) {
|
||||
DCHECK(base::bits::IsPowerOfTwo32(x));
|
||||
int bits = 0;
|
||||
#ifdef DEBUG
|
||||
int original_x = x;
|
||||
uint32_t original_x = x;
|
||||
#endif
|
||||
if (x >= 0x10000) {
|
||||
bits += 16;
|
||||
@ -62,7 +62,7 @@ inline int WhichPowerOf2(uint32_t x) {
|
||||
case 2: bits++; // Fall through.
|
||||
case 1: break;
|
||||
}
|
||||
DCHECK_EQ(1 << bits, original_x);
|
||||
DCHECK_EQ(static_cast<uint32_t>(1) << bits, original_x);
|
||||
return bits;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ inline int WhichPowerOf2_64(uint64_t x) {
|
||||
case 2: bits++; // Fall through.
|
||||
case 1: break;
|
||||
}
|
||||
DCHECK_EQ(1L << bits, original_x);
|
||||
DCHECK_EQ(static_cast<uint64_t>(1) << bits, original_x);
|
||||
return bits;
|
||||
}
|
||||
|
||||
|
@ -1721,7 +1721,7 @@ const char* GetBranchDeoptReason(i::CpuProfile* iprofile, const char* branch[],
|
||||
v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile);
|
||||
const ProfileNode* iopt_function = NULL;
|
||||
iopt_function = GetSimpleBranch(profile, branch, length);
|
||||
CHECK_EQ(1, iopt_function->deopt_infos().size());
|
||||
CHECK_EQ(1U, iopt_function->deopt_infos().size());
|
||||
return iopt_function->deopt_infos()[0].deopt_reason;
|
||||
}
|
||||
|
||||
@ -1902,11 +1902,11 @@ TEST(DeoptAtFirstLevelInlinedSource) {
|
||||
GetSimpleBranch(profile, branch, arraysize(branch));
|
||||
const std::vector<v8::CpuProfileDeoptInfo>& deopt_infos =
|
||||
itest_node->deopt_infos();
|
||||
CHECK_EQ(1, deopt_infos.size());
|
||||
CHECK_EQ(1U, deopt_infos.size());
|
||||
|
||||
const v8::CpuProfileDeoptInfo& info = deopt_infos[0];
|
||||
CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber), info.deopt_reason);
|
||||
CHECK_EQ(2, info.stack.size());
|
||||
CHECK_EQ(2U, info.stack.size());
|
||||
CHECK_EQ(inlined_script_id, info.stack[0].script_id);
|
||||
CHECK_EQ(offset(inlined_source, "left /"), info.stack[0].position);
|
||||
CHECK_EQ(script_id, info.stack[1].script_id);
|
||||
@ -1975,11 +1975,11 @@ TEST(DeoptAtSecondLevelInlinedSource) {
|
||||
GetSimpleBranch(profile, branch, arraysize(branch));
|
||||
const std::vector<v8::CpuProfileDeoptInfo>& deopt_infos =
|
||||
itest_node->deopt_infos();
|
||||
CHECK_EQ(1, deopt_infos.size());
|
||||
CHECK_EQ(1U, deopt_infos.size());
|
||||
|
||||
const v8::CpuProfileDeoptInfo info = deopt_infos[0];
|
||||
CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber), info.deopt_reason);
|
||||
CHECK_EQ(3, info.stack.size());
|
||||
CHECK_EQ(3U, info.stack.size());
|
||||
CHECK_EQ(inlined_script_id, info.stack[0].script_id);
|
||||
CHECK_EQ(offset(inlined_source, "left /"), info.stack[0].position);
|
||||
CHECK_EQ(script_id, info.stack[1].script_id);
|
||||
@ -2031,7 +2031,7 @@ TEST(DeoptUntrackedFunction) {
|
||||
const char* branch[] = {"", "test"};
|
||||
const ProfileNode* itest_node =
|
||||
GetSimpleBranch(profile, branch, arraysize(branch));
|
||||
CHECK_EQ(0, itest_node->deopt_infos().size());
|
||||
CHECK_EQ(0U, itest_node->deopt_infos().size());
|
||||
|
||||
iprofiler->DeleteProfile(iprofile);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user