Commit 7ab9733
authored
Fix unintentional macro shadowing in json.h (#8162)
json.h defines two lambdas with the same name
[link](https://github.com/WebAssembly/binaryen/blob/c2e47d3bffdb66e237525da24d8c28f4b5402f20/src/support/json.h#L274-L283).
From #8086, the calls in json.h are macro-expanded rather than using the
lambdas defined there. This is coincidentally ok because they have the
exact same definition, but results in an unused variable warning for the
two lambdas. This happens in #8086 and not in main because that PR adds
`#include "ir/memory-utils.h"` in wasm-interpreter.h which probably
results in simple_ast.h being included before json.h which causes the
shadowing.
[Without this
PR](https://gist.github.com/stevenfontanella/16ea5cc5144db625e5b6194706e3617d).
With this PR, compilation succeeds.1 parent c2e47d3 commit 7ab9733
1 file changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
| |||
0 commit comments