diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/wasm-reduce.cpp | 1 | ||||
-rw-r--r-- | src/tools/wasm-shell.cpp | 6 | ||||
-rw-r--r-- | src/tools/wasm2c-wrapper.h | 3 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index d92e0a93c..078eca648 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -935,7 +935,6 @@ struct Reducer // process things here, we may replace the module, so we should never again // refer to curr. assert(curr == module.get()); - WASM_UNUSED(curr); curr = nullptr; // Reduction of entire functions at a time is very effective, and we do it diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index 61b35e6db..70f52a038 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -193,7 +193,7 @@ protected: } void parseAssertTrap(Element& s) { - bool trapped = false; + [[maybe_unused]] bool trapped = false; auto& inner = *s[1]; if (inner[0]->str() == MODULE) { return parseModuleAssertion(s); @@ -207,7 +207,6 @@ protected: std::cout << "[exception thrown: " << e << "]" << std::endl; trapped = true; } - WASM_UNUSED(trapped); assert(trapped); } @@ -218,7 +217,7 @@ protected: expected = getLiteralsFromConstExpression( builders[lastModule]->parseExpression(*s[2])); } - bool trapped = false; + [[maybe_unused]] bool trapped = false; try { actual = parseOperation(*s[1]); } catch (const TrapException&) { @@ -227,7 +226,6 @@ protected: std::cout << "[exception thrown: " << e << "]" << std::endl; trapped = true; } - WASM_UNUSED(trapped); assert(!trapped); std::cerr << "seen " << actual << ", expected " << expected << '\n'; if (expected != actual) { diff --git a/src/tools/wasm2c-wrapper.h b/src/tools/wasm2c-wrapper.h index f44fc5ca0..984a9b53a 100644 --- a/src/tools/wasm2c-wrapper.h +++ b/src/tools/wasm2c-wrapper.h @@ -203,8 +203,7 @@ int main(int argc, char** argv) { // Emit the parameters (all 0s, like the other wrappers). bool first = true; - for (const auto& param : func->getParams()) { - WASM_UNUSED(param); + for ([[maybe_unused]] const auto& param : func->getParams()) { if (!first) { ret += ", "; } |