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 08FAA454EF; Tue, 25 Jun 2024 13:16:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F17B0427E5; Tue, 25 Jun 2024 13:15:38 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 11C6242759 for ; Tue, 25 Jun 2024 13:15:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314116; x=1750850116; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/hkWlOFOm5tFB6raGFSZTCTQXixZadPSrq+CiZSK304=; b=XI7BOu9O5EhKd2m4JpepeFLkw3fAoZyquYhTEJaI1P559++txDicvcPq cjnCsZ30akEndwJs8OLLYg36iaCVw1aw/bLOnXgjJlAYu/a23IxcbkQHE tAFT36I0wKgeZrPz4V8G81h2Xl6XYEL769QIAEzMJ4Dw5TVa22XJVFi8Z llCT3L/Q7RNDBHHi8U8HuICj4i/yHkrHOFNxEhx/Cv4b78dGWoQer/V1g rav8UVYPgifBy+gK1X+TNSyRTbCEoj2o0xPmaPyF5Ld9mxgSKL8Uafq+L 0eAENUO3+M/CPKtRd4R1pcd6HOeFHbNuIAxtzAhlTprO+rbM89Q+sShP8 A==; X-CSE-ConnectionGUID: f9gB5zSLR8OdSZemnAQduA== X-CSE-MsgGUID: EE3XS64/StSagkr1O/mQjg== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080085" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080085" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:15:15 -0700 X-CSE-ConnectionGUID: FH27vyRHQ3GV8vInAj12Ig== X-CSE-MsgGUID: TcGyI9HmR6SP5OSjotkFTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43718916" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:15:15 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Fabio Pricoco , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 010/129] net/ice/base: avoid undefined variables Date: Tue, 25 Jun 2024 12:12:15 +0100 Message-ID: <7af520775f5eefe47e9a1af67e78ba430fb8fdd0.1719313663.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Fabio Pricoco Initialize some variable to avoid "variable might be not defined" warning. This is due to the fact that when using silicon validation tools, sometimes alternative fragments of code are being executed exclusively thanks to use of goto, which some compilers cannot handle correctly. Signed-off-by: Fabio Pricoco Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index bd30ce137a..a6b91689f0 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -5768,7 +5768,7 @@ ice_cfg_dflt_vsi(struct ice_port_info *pi, u16 vsi_handle, bool set, u8 direction) { struct ice_fltr_list_entry f_list_entry; - struct ice_sw_recipe *recp_list; + struct ice_sw_recipe *recp_list = NULL; struct ice_fltr_info f_info; struct ice_hw *hw = pi->hw; u8 lport = pi->lport; @@ -10091,7 +10091,7 @@ int ice_replay_vsi_all_fltr(struct ice_hw *hw, struct ice_port_info *pi, u16 vsi_handle) { - struct ice_switch_info *sw; + struct ice_switch_info *sw = NULL; int status; u8 i; -- 2.43.0