From 197b6da7afe6ec317011800abf9453402e6beaa5 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 1 Dec 2022 17:27:59 -0800 Subject: Use C++17's [[maybe_unused]]. NFC (#5309) --- src/wasm-binary.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/wasm-binary.h') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index cc291f163..1ca136f07 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -203,8 +203,7 @@ public: return *this; } BufferWithRandomAccess& operator<<(U32LEB x) { - size_t before = -1; - WASM_UNUSED(before); + [[maybe_unused]] size_t before = -1; BYN_DEBUG(before = size(); std::cerr << "writeU32LEB: " << x.value << " (at " << before << ")" << std::endl;); @@ -215,8 +214,7 @@ public: return *this; } BufferWithRandomAccess& operator<<(U64LEB x) { - size_t before = -1; - WASM_UNUSED(before); + [[maybe_unused]] size_t before = -1; BYN_DEBUG(before = size(); std::cerr << "writeU64LEB: " << x.value << " (at " << before << ")" << std::endl;); @@ -227,8 +225,7 @@ public: return *this; } BufferWithRandomAccess& operator<<(S32LEB x) { - size_t before = -1; - WASM_UNUSED(before); + [[maybe_unused]] size_t before = -1; BYN_DEBUG(before = size(); std::cerr << "writeS32LEB: " << x.value << " (at " << before << ")" << std::endl;); @@ -239,8 +236,7 @@ public: return *this; } BufferWithRandomAccess& operator<<(S64LEB x) { - size_t before = -1; - WASM_UNUSED(before); + [[maybe_unused]] size_t before = -1; BYN_DEBUG(before = size(); std::cerr << "writeS64LEB: " << x.value << " (at " << before << ")" << std::endl;); -- cgit v1.2.3