diff options
author | Daniel Wirtz <dcode@dcode.io> | 2018-05-09 22:01:18 +0200 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2018-05-09 13:01:18 -0700 |
commit | 6a9ececa2fc9eca99a12b65ca130612942babdce (patch) | |
tree | d1b79577dc98333bc2d5e708633fe71172c594de /src/wasm/wasm-validator.cpp | |
parent | 991974c2049796676a967b5a5d3ffe195e5d818d (diff) | |
download | binaryen-6a9ececa2fc9eca99a12b65ca130612942babdce.tar.gz binaryen-6a9ececa2fc9eca99a12b65ca130612942babdce.tar.bz2 binaryen-6a9ececa2fc9eca99a12b65ca130612942babdce.zip |
Fix MSVC warnings when compiling the binaryen target (#1535)
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 2e432b174..07f0a634b 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -494,7 +494,7 @@ void FunctionValidator::visitGetGlobal(GetGlobal* curr) { void FunctionValidator::visitSetGlobal(SetGlobal* curr) { if (!info.validateGlobally) return; auto* global = getModule()->getGlobalOrNull(curr->name); - if (shouldBeTrue(global, curr, "set_global name must be valid (and not an import; imports can't be modified)")) { + if (shouldBeTrue(global != NULL, curr, "set_global name must be valid (and not an import; imports can't be modified)")) { shouldBeTrue(global->mutable_, curr, "set_global global must be mutable"); shouldBeEqualOrFirstIsUnreachable(curr->value->type, global->type, curr, "set_global value must have right type"); } @@ -1031,10 +1031,10 @@ static void validateModule(Module& module, ValidationInfo& info) { // perhaps by moving some of the pass infrastructure into libsupport. bool WasmValidator::validate(Module& module, FeatureSet features, Flags flags) { ValidationInfo info; - info.validateWeb = flags & Web; - info.validateGlobally = flags & Globally; + info.validateWeb = (flags & Web) != 0; + info.validateGlobally = (flags & Globally) != 0; info.features = features; - info.quiet = flags & Quiet; + info.quiet = (flags & Quiet) != 0; // parallel wasm logic validation PassRunner runner(&module); runner.add<FunctionValidator>(&info); |