DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] test/ring: fix return uninitialized variable
@ 2025-02-19 14:23 Konstantin Ananyev
  2025-02-22  2:08 ` fengchengwen
  0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread

* Re: [PATCH] test/ring: fix return uninitialized variable
  2025-02-19 14:23 [PATCH] test/ring: fix return uninitialized variable Konstantin Ananyev
@ 2025-02-22  2:08 ` fengchengwen
  0 siblings, 0 replies; 2+ messages in thread
From: fengchengwen @ 2025-02-22  2:08 UTC (permalink / raw)
  To: Konstantin Ananyev, dev; +Cc: honnappa.nagarahalli

Acked-by: Chengwen Feng <fengchengwen@huawei.com>

On 2025/2/19 22:23, Konstantin Ananyev wrote:
> 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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-22  2:08 UTC | newest]

Thread overview: 2+ messages (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
2025-02-22  2:08 ` fengchengwen

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