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 AAE1AA050B for ; Wed, 13 Apr 2022 14:06:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B3974068B; Wed, 13 Apr 2022 14:06:04 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7D6A84068B for ; Wed, 13 Apr 2022 14:06:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649851560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHLqCCmTkLz7OeyKWiCUle8aXCO7RHr2teHbq1muOLg=; b=d9PAN/c/G3oaaCodH8OGFKu93fUqvf+mgScGFOJDZWj6ls74WLBhzGYDZy2WC5W28IJ5yH yvMMf1OuG1nZ0tSIvHb46lroNG4FG4PekHI3vPADVJRyvRXishk1aIinmPBUDgboVB1AyZ uAonRWCqVQdVggeQLbL3rs+oiUojgl4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-627-ysiSdEHFOgqJDpRH0OMsbg-1; Wed, 13 Apr 2022 08:05:58 -0400 X-MC-Unique: ysiSdEHFOgqJDpRH0OMsbg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D649811E7A; Wed, 13 Apr 2022 12:05:57 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 36D2B40D1D3; Wed, 13 Apr 2022 12:05:55 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: yux.jiang@intel.com, daxuex.gao@intel.com, Rakesh Kudurumalla , Ferruh Yigit , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Jerin Jacob Subject: [PATCH 21.11] net/cnxk: fix build with optimization Date: Wed, 13 Apr 2022 13:05:11 +0100 Message-Id: <20220413120511.566715-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Rakesh Kudurumalla [upstream commit 68f8a52a6b0ad6b77772d4564928aebb21c2ca66 ] Fix the following build error seen with --optimization=1 and GCC 10.3.0. drivers/net/cnxk/cnxk_ethdev_mtr.c: In function ‘cnxk_nix_mtr_policy_validate’: lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Bugzilla ID: 939 Bugzilla ID: 992 Fixes: b526599020ef ("net/cnxk: fix build with GCC 12") Reported-by: Ferruh Yigit Signed-off-by: Rakesh Kudurumalla --- drivers/net/cnxk/cnxk_ethdev_mtr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cnxk_ethdev_mtr.c b/drivers/net/cnxk/cnxk_ethdev_mtr.c index 6d14c88e7d..b6ccccdc39 100644 --- a/drivers/net/cnxk/cnxk_ethdev_mtr.c +++ b/drivers/net/cnxk/cnxk_ethdev_mtr.c @@ -281,5 +281,5 @@ static int update_mtr_err(uint32_t act_color, struct rte_mtr_error *error, bool action) { - const char *str; + const char *str = NULL; switch (act_color) { case RTE_COLOR_GREEN: -- 2.34.1