Reviewed-by: Zhiguang Liu <zhiguang....@intel.com> > -----Original Message----- > From: Chen, Gang C <gang.c.c...@intel.com> > Sent: Wednesday, August 24, 2022 10:27 PM > To: devel@edk2.groups.io > Cc: Chen, Gang C <gang.c.c...@intel.com>; Ni, Ray <ray...@intel.com>; > Kinney, Michael D <michael.d.kin...@intel.com>; Gao, Liming > <gaolim...@byosoft.com.cn>; Liu, Zhiguang <zhiguang....@intel.com> > Subject: [PATCH] UefiPayloadPkg/PayloadLoaderPeim: remove GCC build > warning > > Fix the gcc build warning: > variable PldInfo set but not used [-Wunused-but-set-variable] > > Cc: Ray Ni <ray...@intel.com> > Cc: Michael D Kinney <michael.d.kin...@intel.com> > Cc: Liming Gao <gaolim...@byosoft.com.cn> > Cc: Zhiguang Liu <zhiguang....@intel.com> > Signed-off-by: Gang Chen <gang.c.c...@intel.com> > --- > 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
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92779): https://edk2.groups.io/g/devel/message/92779 Mute This Topic: https://groups.io/mt/93227587/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-