summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-12-01 17:27:59 -0800
committerGitHub <noreply@github.com>2022-12-02 01:27:59 +0000
commit197b6da7afe6ec317011800abf9453402e6beaa5 (patch)
tree564ae447dc2af116be8948703da85e8d9198f7c4 /src/wasm-binary.h
parentf70bc4d6634c5a0b1aa88f3c073b783e83bb5712 (diff)
downloadbinaryen-197b6da7afe6ec317011800abf9453402e6beaa5.tar.gz
binaryen-197b6da7afe6ec317011800abf9453402e6beaa5.tar.bz2
binaryen-197b6da7afe6ec317011800abf9453402e6beaa5.zip
Use C++17's [[maybe_unused]]. NFC (#5309)
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h12
1 files changed, 4 insertions, 8 deletions
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;);