Commit df15c60e authored by Ivica Bogosavljevic's avatar Ivica Bogosavljevic Committed by Commit Bot

GYP: Fix compilation failure due to Wtautological-constant-compare warning

Port https://chromium-review.googlesource.com/c/chromium/src/+/752143 to GYP

Bug: 
Change-Id: Id6f3322282ef5992b1e93dcab16d573a6b394a4d
Reviewed-on: https://chromium-review.googlesource.com/758243Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#49227}
parent 2974f2c1
...@@ -439,6 +439,7 @@ ...@@ -439,6 +439,7 @@
'-Wno-undefined-var-template', '-Wno-undefined-var-template',
# TODO(yangguo): issue 5258 # TODO(yangguo): issue 5258
'-Wno-nonportable-include-path', '-Wno-nonportable-include-path',
'-Wno-tautological-constant-compare',
], ],
'conditions':[ 'conditions':[
['OS=="android"', { ['OS=="android"', {
......
...@@ -1392,11 +1392,10 @@ AsmType* AsmJsParser::NumericLiteral() { ...@@ -1392,11 +1392,10 @@ AsmType* AsmJsParser::NumericLiteral() {
if (uvalue <= 0x7fffffff) { if (uvalue <= 0x7fffffff) {
current_function_builder_->EmitI32Const(static_cast<int32_t>(uvalue)); current_function_builder_->EmitI32Const(static_cast<int32_t>(uvalue));
return AsmType::FixNum(); return AsmType::FixNum();
} else if (uvalue <= 0xffffffff) { } else {
DCHECK_LE(uvalue, 0xffffffff);
current_function_builder_->EmitI32Const(static_cast<int32_t>(uvalue)); current_function_builder_->EmitI32Const(static_cast<int32_t>(uvalue));
return AsmType::Unsigned(); return AsmType::Unsigned();
} else {
FAILn("Integer numeric literal out of range.");
} }
} else { } else {
FAILn("Expected numeric literal."); FAILn("Expected numeric literal.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment