On 9/17/19 9:49 PM, Laszlo Ersek wrote: > Clean up two issues around FindFileEx(): > > - The "AprioriFile" parameter's type differs between the function > declaration and the function definition. The correct type is > (EFI_PEI_FILE_HANDLE*). > > - "FfsFileHeader" has type (EFI_FFS_FILE_HEADER*); for clarity, we should > cast it explicitly to EFI_PEI_FILE_HANDLE when assigning it to > (*AprioriFile). > > This is a semantic cleanup, there is no functional change. > > Cc: Dandan Bi <dandan...@intel.com> > Cc: Hao A Wu <hao.a...@intel.com> > Cc: Jian J Wang <jian.j.w...@intel.com> > Cc: Liming Gao <liming....@intel.com> > Signed-off-by: Laszlo Ersek <ler...@redhat.com> > --- > > Notes: > lightly tested: OVMF uses APRIORI PEI in the FDF files > > MdeModulePkg/Core/Pei/FwVol/FwVol.h | 2 +- > MdeModulePkg/Core/Pei/FwVol/FwVol.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.h > b/MdeModulePkg/Core/Pei/FwVol/FwVol.h > index 4082cfbec1f8..ca80e84e0fcb 100644 > --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.h > +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.h > @@ -299,7 +299,7 @@ FindFileEx ( > IN CONST EFI_GUID *FileName, OPTIONAL > IN EFI_FV_FILETYPE SearchType, > IN OUT EFI_PEI_FILE_HANDLE *FileHandle, > - IN OUT EFI_PEI_FV_HANDLE *AprioriFile OPTIONAL > + IN OUT EFI_PEI_FILE_HANDLE *AprioriFile OPTIONAL > ); > > /** > diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c > b/MdeModulePkg/Core/Pei/FwVol/FwVol.c > index 709db00694c2..f4642c47c13a 100644 > --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c > +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c > @@ -407,7 +407,7 @@ FindFileEx ( > } else if (AprioriFile != NULL) { > if (FfsFileHeader->Type == EFI_FV_FILETYPE_FREEFORM) { > if (CompareGuid (&FfsFileHeader->Name, > &gPeiAprioriFileNameGuid)) { > - *AprioriFile = FfsFileHeader; > + *AprioriFile = (EFI_PEI_FILE_HANDLE)FfsFileHeader; > } > } > } >
Reviewed-by: Philippe Mathieu-Daude <phi...@redhat.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47964): https://edk2.groups.io/g/devel/message/47964 Mute This Topic: https://groups.io/mt/34180214/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-