From 0d5804c527e513878050ff8724fdc4cfe35f5275 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Fri, 9 Sep 2022 10:11:19 +0000 Subject: [PATCH] examples/hello_zig: Fix unused return value Zig don't allow unused return value, so let's discard it explicitly. Signed-off-by: Huang Qi --- examples/hello_zig/hello_zig_main.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/hello_zig/hello_zig_main.zig b/examples/hello_zig/hello_zig_main.zig index 1baef3fb2..146e2668a 100644 --- a/examples/hello_zig/hello_zig_main.zig +++ b/examples/hello_zig/hello_zig_main.zig @@ -35,5 +35,6 @@ pub extern fn printf(_format: [*:0]const u8) c_int; pub export fn hello_zig_main(_argc: c_int, _argv: [*]const [*]const u8) c_int { _ = _argc; _ = _argv; - printf("Hello, Zig!\n"); + _ = printf("Hello, Zig!\n"); + return 0; }