DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] test/ring: fix return uninitialized variable
@ 2025-02-19 14:23 Konstantin Ananyev
  0 siblings, 0 replies; only message in thread
From: Konstantin Ananyev @ 2025-02-19 14:23 UTC (permalink / raw)
  To: dev; +Cc: honnappa.nagarahalli

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-19 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-19 14:23 [PATCH] test/ring: fix return uninitialized variable Konstantin Ananyev

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).