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

Unified Diff: src/asmjs/asm-typer.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 | « no previous file | src/wasm/ast-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-typer.cc
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc
index 7b24e524f54173056eb582ff086b5f0989176a5d..55b5fc70d8dcc724e9186688381a162f02469670 100644
--- a/src/asmjs/asm-typer.cc
+++ b/src/asmjs/asm-typer.cc
@@ -567,7 +567,7 @@ AsmType* AsmTyper::ValidateModule(FunctionLiteral* fun) {
module_name_ = fun->name();
// Allowed parameters: Stdlib, FFI, Mem
- static const uint32_t MaxModuleParameters = 3;
+ static const int MaxModuleParameters = 3;
if (scope->num_parameters() > MaxModuleParameters) {
FAIL(fun, "asm.js modules may not have more than three parameters.");
}
@@ -1017,7 +1017,7 @@ AsmType* AsmTyper::ValidateFunctionTable(Assignment* assign) {
FAIL(assign, "Identifier redefined (function table name).");
}
- if (target_info_table->length() != pointers->length()) {
+ if (static_cast<int>(target_info_table->length()) != pointers->length()) {
FAIL(assign, "Function table size mismatch.");
}
@@ -1071,7 +1071,7 @@ AsmType* AsmTyper::ValidateFunction(FunctionDeclaration* fun_decl) {
}
auto* param = proxy->var();
if (param->location() != VariableLocation::PARAMETER ||
- param->index() != annotated_parameters) {
+ param->index() != static_cast<int>(annotated_parameters)) {
// Done with parameters.
break;
}
@@ -1093,7 +1093,7 @@ AsmType* AsmTyper::ValidateFunction(FunctionDeclaration* fun_decl) {
SetTypeOf(expr, type);
}
- if (annotated_parameters != fun->parameter_count()) {
+ if (static_cast<int>(annotated_parameters) != fun->parameter_count()) {
FAIL(fun_decl, "Incorrect parameter type annotations.");
}
« no previous file with comments | « no previous file | src/wasm/ast-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698