From 25f200e9b00978c364dcce34b433d1257af3117c Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 13 Nov 2022 11:10:26 +0800 Subject: [PATCH] Fix Error: sx127x_demo.c:464:7: error: variable 'fd' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] Signed-off-by: Xiang Xiao --- examples/sx127x_demo/sx127x_demo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/sx127x_demo/sx127x_demo.c b/examples/sx127x_demo/sx127x_demo.c index 50b4ee7de..3c586f4d4 100644 --- a/examples/sx127x_demo/sx127x_demo.c +++ b/examples/sx127x_demo/sx127x_demo.c @@ -464,7 +464,7 @@ int main(int argc, FAR char *argv[]) if (ret != OK) { printf("sx127x_main: validate arguments failed!\n"); - goto errout; + return 0; } printf("Start sx127x_demo\n"); @@ -476,7 +476,7 @@ int main(int argc, FAR char *argv[]) { int errcode = errno; printf("ERROR: Failed to open device %s: %d\n", DEV_NAME, errcode); - goto errout; + return 0; } /* Set modulation */