commit 0adcfd60f4fcfd01c74a6477cbcef187ce06f533 (tree)
parent 8eca338c27477ae615e7e519b17fdbc0d236d2df
Author: Jonathan Marler <johnnymarler@gmail.com>
Date: Wed, 25 Jun 2025 22:39:08 -0700
Fix warning WasmMut_toC not all control paths return a value (#24267)
* Fix warning WasmMut_toC not all control paths return a value
This is a follow up to https://github.com/ziglang/zig/pull/24206 where
I had previously submitted different mechanisms to fix this warning.
This PR is a suggestion by Alex to return NULL instead and Andrew
confirmed this is his preference.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/stage1/wasm.h b/stage1/wasm.h
@@ -52,6 +52,7 @@ static const char *WasmMut_toC(enum WasmMut val_type) {
case WasmMut_var: return "";
default: panic("unsupported mut");
}
+ return NULL;
}
enum WasmOpcode {