During LTO build compiler reports some 'false positive' warnings about
variables being possibly used uninitialized. This patch silences these
warnings.
Exemplary compiler warning to suppress (with LTO enabled):
error: ‘service_id’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
ret = evt_service_setup(service_id);
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
if (!(adapter_info.caps &
RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT)) {
- uint32_t service_id;
+ uint32_t service_id = -1U;
rte_event_timer_adapter_service_id_get(wl,
&service_id);
}
if (!(cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT)) {
- uint32_t service_id;
+ uint32_t service_id = -1U;
rte_event_eth_rx_adapter_service_id_get(prod,
&service_id);
}
if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) {
- uint32_t service_id;
+ uint32_t service_id = -1U;
rte_event_eth_tx_adapter_service_id_get(consm,
&service_id);