From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15BE341CEC; Mon, 20 Feb 2023 17:44:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A6E8430A3; Mon, 20 Feb 2023 17:44:13 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id D289A430A0 for ; Mon, 20 Feb 2023 17:44:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676911452; x=1708447452; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OyQCmObxDojYlr7KGZh53q/oAeueYYRPp5nlKf3tU9U=; b=GAFiLDrjd5YKHwwldNDPJ65cnJMY8qcwNhu1i1gSauZ2LnBp//bqfEwN O28xvbsJTO/ojz1N+gFz2NCQi5+WOy/Vr2qUaitOWV6Kp5TBdF8qyyhVJ ls7sliRcaarcnMAmwO+oGJhgrRudRWNqZ1P75MD8gRRHRdsk8AnVFKqKu BDqpcSNbxrBKl3SPRvHsc4s1dVzvgwhyAMBl8t3vNSyczkyh32pC6Qmhz ktOfm8ZDhTxiP2VOtVIo4V8lkXLfw1HL2+fJ6E70v9/4SRzvEFE4i2fqw B26F1ZCSCLmELbI0U/rs1qm6V2iefo8ZBQgFYNUFB1JR0y7y9U0UKD+v3 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10627"; a="316160134" X-IronPort-AV: E=Sophos;i="5.97,313,1669104000"; d="scan'208";a="316160134" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2023 08:44:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10627"; a="740107983" X-IronPort-AV: E=Sophos;i="5.97,313,1669104000"; d="scan'208";a="740107983" Received: from kkaras2.igk.intel.com ([10.211.11.138]) by fmsmga004.fm.intel.com with ESMTP; 20 Feb 2023 08:44:09 -0800 From: Krzysztof Karas To: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Cc: dev@dpdk.org, Krzysztof Karas Subject: [PATCH] ethdev: initialize id in eth_representor_cmp() Date: Mon, 20 Feb 2023 17:44:06 +0100 Message-Id: <20230220164406.1490041-1-krzysztof.karas@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When Link Time Optimization is enabled, compiler may complain about "id" in eth_representor_cmp() being uninitialized. To suppress the warning it is enough to add explicit initialization of the variable causing the issue. Signed-off-by: Krzysztof Karas --- .mailmap | 1 + lib/ethdev/rte_class_eth.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 5015494210..ba34945bc5 100644 --- a/.mailmap +++ b/.mailmap @@ -1573,3 +1573,4 @@ Ziye Yang Zoltan Kiss Zorik Machulsky Zyta Szpak +Krzysztof Karas diff --git a/lib/ethdev/rte_class_eth.c b/lib/ethdev/rte_class_eth.c index 838b3a8f9f..b61dae849d 100644 --- a/lib/ethdev/rte_class_eth.c +++ b/lib/ethdev/rte_class_eth.c @@ -67,7 +67,7 @@ eth_representor_cmp(const char *key __rte_unused, const struct rte_eth_dev *edev = opaque; const struct rte_eth_dev_data *data = edev->data; struct rte_eth_devargs eth_da; - uint16_t id, nc, np, nf, i, c, p, f; + uint16_t id = 0, nc, np, nf, i, c, p, f; if ((data->dev_flags & RTE_ETH_DEV_REPRESENTOR) == 0) return -1; /* not a representor port */ -- 2.34.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.