From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D061DA034E; Thu, 7 Nov 2019 16:04:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A68971BF91; Thu, 7 Nov 2019 16:03:47 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 7565B1BF8D for ; Thu, 7 Nov 2019 16:03:45 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xA7Etm31028456; Thu, 7 Nov 2019 07:03:44 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pfpt0818; bh=D81CQAI19s7DZkJJhi+P3sRqOsN3QBMZIMIHbidIu8I=; b=u6QbTrzPEaWMfQykJqAz0RKiZS4bUgZ/nFij62jxnZi0p5MfJ+EKHmC+MYOqdtydaRXF rc1ZxygTvHbAzle4DgktotdLzTVpgCnryht8eAR/RkLEY8pILRDGHbmy7mrUJcygmsHB naL8D+pvJ4MgeKq3g5EWGEt392Cx5iy3rq6ktkeVTjtc3QgwI6/Y9new9LO0Es/QtWGu zWjkoKKzYL6eIEBeVaTP6vznU293O+TXx8X5BsAshi6YrOhKnw4ITz+x+ShHuXG7e3/u 2vVrciBw4ciXE2HnpcJDeSY2aQ8Jdxgn4jZY8SoWFfc/QLFySsQWvXPP+yw2bjsT9pSA vw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2w4fq6sbxr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Nov 2019 07:03:44 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 7 Nov 2019 07:03:43 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 7 Nov 2019 07:03:43 -0800 Received: from amok.marvell.com (unknown [10.95.130.48]) by maili.marvell.com (Postfix) with ESMTP id DC5BC3F7040; Thu, 7 Nov 2019 07:03:41 -0800 (PST) From: Andrzej Ostruszka To: , Beilei Xing , Qi Zhang CC: , Date: Thu, 7 Nov 2019 16:03:16 +0100 Message-ID: <20191107150318.3677-11-aostruszka@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191107150318.3677-1-aostruszka@marvell.com> References: <20191029141212.4907-1-aostruszka@marvell.com> <20191107150318.3677-1-aostruszka@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-07_05:2019-11-07,2019-11-07 signatures=0 Subject: [dpdk-dev] [PATCH v7 10/12] net/i40e: clean LTO build warnings (maybe-uninitialized) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 77a46832c..91d529b2f 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.17.1