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.
This commit is contained in:
Jonathan Marler 2025-06-25 22:39:08 -07:00 committed by GitHub
parent 8eca338c27
commit 0adcfd60f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,6 +52,7 @@ static const char *WasmMut_toC(enum WasmMut val_type) {
case WasmMut_var: return ""; case WasmMut_var: return "";
default: panic("unsupported mut"); default: panic("unsupported mut");
} }
return NULL;
} }
enum WasmOpcode { enum WasmOpcode {