Fixes for comparisons between signed and unsigned values with new jb-mr2 compiler (for x86, ARM previously fixed in d74e41b1cce5373aa24fd2fbea735173f6113d5a)
Change-Id: Iaf94d5e849ce8406f1d1742cbf819f8af7e521cd
diff --git a/src/oat/runtime/x86/context_x86.cc b/src/oat/runtime/x86/context_x86.cc
index 338a5ae..ceb10bd 100644
--- a/src/oat/runtime/x86/context_x86.cc
+++ b/src/oat/runtime/x86/context_x86.cc
@@ -62,7 +62,7 @@
}
void X86Context::SetGPR(uint32_t reg, uintptr_t value){
- CHECK_LT(reg, kNumberOfCpuRegisters);
+ CHECK_LT(reg, static_cast<uint32_t>(kNumberOfCpuRegisters));
CHECK_NE(gprs_[reg], &gZero);
CHECK(gprs_[reg] != NULL);
*gprs_[reg] = value;
diff --git a/src/oat/runtime/x86/context_x86.h b/src/oat/runtime/x86/context_x86.h
index ad49f8d..7928fd8 100644
--- a/src/oat/runtime/x86/context_x86.h
+++ b/src/oat/runtime/x86/context_x86.h
@@ -43,7 +43,7 @@
}
virtual uintptr_t GetGPR(uint32_t reg) {
- CHECK_LT(reg, kNumberOfCpuRegisters);
+ CHECK_LT(reg, static_cast<uint32_t>(kNumberOfCpuRegisters));
return *gprs_[reg];
}