From: Ferruh Yigit Date: Tue, 9 Oct 2018 10:13:22 +0000 (+0100) Subject: eventdev: fix build X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=850716bc57c0ebb992b8455238a71adb0fd9fc1e;p=dpdk.git eventdev: fix build build error: .../lib/librte_eventdev/rte_event_eth_tx_adapter.c: In function ‘txa_service_queue_del’: .../lib/librte_eventdev/rte_event_eth_tx_adapter.c:800:7: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] compilation terminated due to -Wfatal-errors. https://mails.dpdk.org/archives/test-report/2018-October/065919.html 'ret' may be used uninitialized when 'dev->data->nb_tx_queues' is 0, although this is not a practical value, initialize 'ret' to cover this case. Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Signed-off-by: Ferruh Yigit --- diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index aae0378d5b..3a21defba1 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -797,7 +797,7 @@ txa_service_queue_del(uint8_t id, if (tx_queue_id == -1) { uint16_t i; - int ret; + int ret = -1; for (i = 0; i < dev->data->nb_tx_queues; i++) { ret = txa_service_queue_del(id, dev, i);