From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: <dev@dpdk.org>
Cc: <honnappa.nagarahalli@arm.com>
Subject: [PATCH] test/ring: fix return uninitialized variable
Date: Wed, 19 Feb 2025 09:23:14 -0500 [thread overview]
Message-ID: <20250219142314.82235-1-konstantin.ananyev@huawei.com> (raw)
This change addresses the CID 455328: Uninitialized variables (UNINIT).
Strictly speaking right now it should never happen, as role_mask is not
zero. But that might change in future, as more test-cases will be
introduced. Anyway the fix is trivial.
Coverity issue: 455328
Fixes: 70581c355d69 ("test/ring: add unit tests for soring API")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
app/test/test_soring_stress_impl.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/test/test_soring_stress_impl.h b/app/test/test_soring_stress_impl.h
index 9e22de98d2..015825223d 100644
--- a/app/test/test_soring_stress_impl.h
+++ b/app/test/test_soring_stress_impl.h
@@ -405,6 +405,8 @@ test_worker(void *arg, const char *fname, int32_t prcs)
cl = rte_rdtsc_precise();
do {
+ rc = 0;
+
if ((la->stats.role_mask & ~ROLE_DEQENQ) != 0) {
rc = test_worker_stages(la, lc, fname, obj,
&def_elm, &loc_elm, stg_elm, prcs);
--
2.35.3
next reply other threads:[~2025-02-19 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 14:23 Konstantin Ananyev [this message]
2025-02-22 2:08 ` fengchengwen
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=20250219142314.82235-1-konstantin.ananyev@huawei.com \
--to=konstantin.ananyev@huawei.com \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.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;
as well as URLs for NNTP newsgroup(s).