You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/09/10 03:09:28 UTC
[incubator-nuttx-apps] 01/02: examples/hello_zig: Fix unused return value
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 0d5804c527e513878050ff8724fdc4cfe35f5275
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Fri Sep 9 10:11:19 2022 +0000
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 <hu...@xiaomi.com>
---
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;
}