From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.11517.1661351132070361451 for ; Wed, 24 Aug 2022 07:25:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=LI1XuSyP; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: gang.c.chen@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661351132; x=1692887132; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=h7+Cca70+/rCxf1LbvmToXnfVMhcWBB4gMuNeRSca3M=; b=LI1XuSyPHQkJdGroaQBJ8HNA9x/NZ3iAhWJW0iV6nxQQ1y2lQN5Xg6v9 YLxx8vi/4vzkUBVJOGOaMeo21Vgk36IZzr0b39Bpl46AtVnW5uiGLcOd9 36IBjQiXTJ36DGR+DRwehPi+2jghMbI73hGSucwkNs2swcicx69bYD6On ZftUXxw2+RtdM/S1YYRp4beYajvqsQGUNar14Pn5sV+trWsF6ASQZtFGn OYZxdnEDkC9/iI5AMu7hn5Qxk5mPTbt1nqarIuZ2bx4XRL9Pj5JUA02Pw hV722zI8mZ0FJ1QvVCL75DhH/18M7lFdEY2TycpvCTxIsjB6505P+rXgs g==; X-IronPort-AV: E=McAfee;i="6500,9779,10449"; a="277003975" X-IronPort-AV: E=Sophos;i="5.93,260,1654585200"; d="scan'208";a="277003975" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2022 07:25:31 -0700 X-IronPort-AV: E=Sophos;i="5.93,260,1654585200"; d="scan'208";a="639138120" Received: from gchen29.sh.intel.com ([10.239.154.135]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2022 07:25:29 -0700 From: "Chen, Gang C" To: devel@edk2.groups.io Cc: Gang Chen , Ray Ni , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [PATCH] UefiPayloadPkg/PayloadLoaderPeim: remove GCC build warning Date: Wed, 24 Aug 2022 22:27:01 +0800 Message-Id: <20220824142701.3657728-1-gang.c.chen@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fix the gcc build warning: variable PldInfo set but not used [-Wunused-but-set-variable] Cc: Ray Ni Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Gang Chen --- UefiPayloadPkg/PayloadLoaderPeim/PayloadLoaderPeim.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/UefiPayloadPkg/PayloadLoaderPeim/PayloadLoaderPeim.c b/UefiPayloadPkg/PayloadLoaderPeim/PayloadLoaderPeim.c index 9a2c3c148d..fba0e6cba5 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/PayloadLoaderPeim.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/PayloadLoaderPeim.c @@ -48,7 +48,6 @@ PeiLoadFileLoadPayload ( VOID *Elf; UNIVERSAL_PAYLOAD_EXTRA_DATA *ExtraData; ELF_IMAGE_CONTEXT Context; - UNIVERSAL_PAYLOAD_INFO_HEADER *PldInfo; UINT32 Index; UINT16 ExtraDataIndex; CHAR8 *SectionName; @@ -85,7 +84,6 @@ PeiLoadFileLoadPayload ( // // Get UNIVERSAL_PAYLOAD_INFO_HEADER and number of additional PLD sections. // - PldInfo = NULL; ExtraDataCount = 0; for (Index = 0; Index < Context.ShNum; Index++) { Status = GetElfSectionName (&Context, Index, &SectionName); @@ -96,9 +94,6 @@ PeiLoadFileLoadPayload ( DEBUG ((DEBUG_INFO, "Payload Section[%d]: %a\n", Index, SectionName)); if (AsciiStrCmp (SectionName, UNIVERSAL_PAYLOAD_INFO_SEC_NAME) == 0) { Status = GetElfSectionPos (&Context, Index, &Offset, &Size); - if (!EFI_ERROR (Status)) { - PldInfo = (UNIVERSAL_PAYLOAD_INFO_HEADER *)(Context.FileBase + Offset); - } } else if (AsciiStrnCmp (SectionName, UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX, UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX_LENGTH) == 0) { Status = GetElfSectionPos (&Context, Index, &Offset, &Size); if (!EFI_ERROR (Status)) { -- 2.35.1