[dpdk-dev] [PATCH v1 3/3] app/test: fix issues with clang 21.1.4

David Marchand david.marchand at redhat.com
Wed Oct 29 14:19:41 CET 2025


On Tue, 28 Oct 2025 at 18:25, <jerinj at marvell.com> wrote:
>
> From: Jerin Jacob <jerinj at marvell.com>
>
> Fix the following errors seen with clang 21.1.4
>
> app/test/test_event_dma_adapter.c:532:32: error: variable 'event' is
> uninitialized when passed as a const pointer argument here
> [-Werror,-Wuninitialized-const-pointer]
>
> app/test/test_trace.c:201:29: error: variable 'tmp' is uninitialized
> when passed as a const pointer argument here
> [-Werror,-Wuninitialized-const-pointer]
>
> Fixes: 4925e15a1614 ("trace: add trace point emit for blob")

I don't think this Fixes: tag is the right one.
Instead, I would point at 9247e71dfb55 ("test/trace: add functional
test cases").


> Fixes: a276e7c8fbb3 ("test/event: add DMA adapter auto-test")
> Cc: stable at dpdk.org
>
> Signed-off-by: Jerin Jacob <jerinj at marvell.com>
> ---
>  app/test/test_event_dma_adapter.c | 2 ++
>  app/test/test_trace.c             | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/app/test/test_event_dma_adapter.c b/app/test/test_event_dma_adapter.c
> index 7f72a4e81d..4df5991285 100644
> --- a/app/test/test_event_dma_adapter.c
> +++ b/app/test/test_event_dma_adapter.c
> @@ -144,6 +144,7 @@ test_dma_adapter_params(void)
>         TEST_ASSERT_SUCCESS(err, "Failed to get adapter capabilities\n");
>
>         if (cap & RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND) {
> +               event.queue_id = 0;
>                 err = rte_event_dma_adapter_vchan_add(TEST_ADAPTER_ID, TEST_DMA_DEV_ID,
>                                                             TEST_DMA_VCHAN_ID, &event);
>         } else
> @@ -528,6 +529,7 @@ test_dma_adapter_vchan_add_del(void)
>         TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
>
>         if (cap & RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND) {
> +               event.queue_id = 0;
>                 ret = rte_event_dma_adapter_vchan_add(TEST_ADAPTER_ID, TEST_DMA_DEV_ID,
>                                                             TEST_DMA_VCHAN_ID, &event);
>         } else

Same comment than for the eventdev test app, I would move those event
variable declaration in the block where only needed.

Otherwise, this lgtm and was tested on Fedora 43.


-- 
David Marchand



More information about the stable mailing list