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

Unified Diff: test/cctest/wasm/test-run-wasm.cc

Issue 2487673004: [wasm] Fix -Wsign-compare warnings. (Closed)
Patch Set: address comments Created 4 years, 1 month 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 | « test/cctest/test-run-wasm-relocation-x64.cc ('k') | test/cctest/wasm/test-run-wasm-64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm.cc
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index 51a6f7da817cfbe132158569955cf34d6be5b33d..0a56ec10cc3717cb62d070d310b1206cc0ae9cfd 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -1210,7 +1210,7 @@ WASM_EXEC_TEST(Block_empty_brif2) {
WasmRunner<uint32_t> r(execution_mode, MachineType::Uint32(),
MachineType::Uint32());
BUILD(r, WASM_BLOCK(WASM_BR_IF(0, WASM_GET_LOCAL(1))), WASM_GET_LOCAL(0));
- FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i, *i + 1)); }
+ FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i, *i + 1)); }
}
WASM_EXEC_TEST(Block_i) {
@@ -1234,7 +1234,7 @@ WASM_EXEC_TEST(Block_d) {
WASM_EXEC_TEST(Block_br2) {
WasmRunner<int32_t> r(execution_mode, MachineType::Int32());
BUILD(r, WASM_BLOCK_I(WASM_BRV(0, WASM_GET_LOCAL(0))));
- FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
+ FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, static_cast<uint32_t>(r.Call(*i))); }
}
WASM_EXEC_TEST(Block_If_P) {
@@ -1596,7 +1596,7 @@ WASM_EXEC_TEST(LoadMemI32_const_oob_misaligned) {
BUILD(r,
WASM_LOAD_MEM_OFFSET(MachineType::Int32(), offset, WASM_I8(index)));
- if ((offset + index) <= (kMemSize - sizeof(int32_t))) {
+ if ((offset + index) <= static_cast<int>((kMemSize - sizeof(int32_t)))) {
CHECK_EQ(module.raw_val_at<int32_t>(offset + index), r.Call());
} else {
CHECK_TRAP(r.Call());
@@ -1618,7 +1618,7 @@ WASM_EXEC_TEST(LoadMemI32_const_oob) {
BUILD(r,
WASM_LOAD_MEM_OFFSET(MachineType::Int32(), offset, WASM_I8(index)));
- if ((offset + index) <= (kMemSize - sizeof(int32_t))) {
+ if ((offset + index) <= static_cast<int>((kMemSize - sizeof(int32_t)))) {
CHECK_EQ(module.raw_val_at<int32_t>(offset + index), r.Call());
} else {
CHECK_TRAP(r.Call());
« no previous file with comments | « test/cctest/test-run-wasm-relocation-x64.cc ('k') | test/cctest/wasm/test-run-wasm-64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698