From: Zhouyi Zhou <zhouzhouyi@gmail.com>
To: nathan@kernel.org, ndesaulniers@google.com, trix@redhat.com,
akpm@linux-foundation.org, geert+renesas@glider.be,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Cc: Zhouyi Zhou <zhouzhouyi@gmail.com>
Subject: [PATCH linux-next] lib: Dhrystone: initialize ret value
Date: Sat, 24 Dec 2022 13:06:40 +0800 [thread overview]
Message-ID: <20221224050640.64427-1-zhouzhouyi@gmail.com> (raw)
Initialize ret value whenever 'if' condition is false in dhry_run_set.
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
---
Dear Developers:
When I invoke make bzImage LLVM=1, clang complains followings:
lib/dhry_run.c:61:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false
Fix above complain by initialize the ret value.
Thanks
Zhouyi
--
lib/dhry_run.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/dhry_run.c b/lib/dhry_run.c
index 31a1d442e4a0..be86e5126c29 100644
--- a/lib/dhry_run.c
+++ b/lib/dhry_run.c
@@ -64,6 +64,7 @@ static int dhry_run_set(const char *val, const struct kernel_param *kp)
return ret;
} else {
dhry_run = true;
+ ret = 0;
}
if (dhry_run && system_state == SYSTEM_RUNNING)
--
2.34.1
next reply other threads:[~2022-12-24 5:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-24 5:06 Zhouyi Zhou [this message]
2022-12-24 5:58 ` Nathan Chancellor
2022-12-24 6:19 ` Zhouyi Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221224050640.64427-1-zhouzhouyi@gmail.com \
--to=zhouzhouyi@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®