authorgravatar for johnnymarler@gmail.comJonathan Marler <johnnymarler@gmail.com> 2025-06-25 22:39:08-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-06-26 05:39:08+00:00
log0adcfd60f4fcfd01c74a6477cbcef187ce06f533
tree4c52ba5b7415cc90ada5f9206deea66b725a69b9
parent8eca338c27477ae615e7e519b17fdbc0d236d2df
signaturebadge-check Signed by PGP key B5690EEEBB952194

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.

1 files changed, 1 insertions(+), 0 deletions(-)

stage1/wasm.h+1
...@@ -52,6 +52,7 @@ static const char *WasmMut_toC(enum WasmMut val_type) {...@@ -52,6 +52,7 @@ static const char *WasmMut_toC(enum WasmMut val_type) {
52 case WasmMut_var: return "";52 case WasmMut_var: return "";
53 default: panic("unsupported mut");53 default: panic("unsupported mut");
54 }54 }
55 return NULL;
55}56}
5657
57enum WasmOpcode {58enum WasmOpcode {