From b06a398ba9ae7b0fb6f225591c86a7fd05b480d8 Mon Sep 17 00:00:00 2001 From: Andrzej Ostruszka Date: Thu, 7 Nov 2019 16:03:16 +0100 Subject: [PATCH 1/1] net/i40e: clean LTO warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: ‘filter_idx’ may be used uninitialized in this function [-Werror=maybe-uninitialized] PMD_DRV_LOG(INFO, "Added port %d with AQ command with index %d", Signed-off-by: Andrzej Ostruszka --- drivers/net/i40e/i40e_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 77a46832ce..91d529b2f3 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -8480,7 +8480,7 @@ static int i40e_add_vxlan_port(struct i40e_pf *pf, uint16_t port, int udp_type) { int idx, ret; - uint8_t filter_idx; + uint8_t filter_idx = 0; struct i40e_hw *hw = I40E_PF_TO_HW(pf); idx = i40e_get_vxlan_port_idx(pf, port); -- 2.20.1