Skip to content

Commit 1bdf2b3

Browse files
Jerin Jacobdavid-marchand
authored andcommitted
app/eventdev: fix build with clang 21
Fix the following error seen with clang 21.1.4 app/test-eventdev/test_perf_common.c:1340:30: error: variable 'event' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] Fixes: b25a66c ("app/eventdev: add DMA adapter performance test") Cc: [email protected] Signed-off-by: Jerin Jacob <[email protected]> Acked-by: Pavan Nikhilesh <[email protected]> Signed-off-by: David Marchand <[email protected]>
1 parent bec307d commit 1bdf2b3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/test-eventdev/test_perf_common.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,6 @@ static int
13161316
perf_event_dma_adapter_setup(struct test_perf *t, struct prod_data *p)
13171317
{
13181318
struct evt_options *opt = t->opt;
1319-
struct rte_event event;
13201319
uint32_t cap;
13211320
int ret;
13221321

@@ -1335,13 +1334,15 @@ perf_event_dma_adapter_setup(struct test_perf *t, struct prod_data *p)
13351334
return -ENOTSUP;
13361335
}
13371336

1338-
if (cap & RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND)
1337+
if (cap & RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND) {
1338+
struct rte_event event = { .queue_id = p->queue_id, };
1339+
13391340
ret = rte_event_dma_adapter_vchan_add(TEST_PERF_DA_ID, p->da.dma_dev_id,
13401341
p->da.vchan_id, &event);
1341-
else
1342+
} else {
13421343
ret = rte_event_dma_adapter_vchan_add(TEST_PERF_DA_ID, p->da.dma_dev_id,
13431344
p->da.vchan_id, NULL);
1344-
1345+
}
13451346
return ret;
13461347
}
13471348

0 commit comments

Comments
 (0)