Reviewed-by: Ruiyu Ni <[email protected]> Thanks/Ray
> -----Original Message----- > From: Bi, Dandan > Sent: Tuesday, September 12, 2017 4:56 PM > To: [email protected] > Cc: Dong, Eric <[email protected]>; Paulo Alcantara <[email protected]>; > Ni, Ruiyu <[email protected]>; Zeng, Star <[email protected]> > Subject: [PATCH v3 2/3] MdeModulePkg/UdfDxe: Initialize the array after > declaration > > Initialize the array DescriptorLBAs[] after declaration to fix non-constant > aggregate initializer warning in VS tool chains. > > Cc: Eric Dong <[email protected]> > Cc: Paulo Alcantara <[email protected]> > Cc: Ruiyu Ni <[email protected]> > Cc: Star Zeng <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Dandan Bi <[email protected]> > --- > MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 13 > ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c > b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c > index 5c5b5e3..904262a 100644 > --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c > +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c > @@ -20,15 +20,22 @@ FindAnchorVolumeDescriptorPointer ( > IN EFI_DISK_IO_PROTOCOL *DiskIo, > OUT UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER *AnchorPoint > ) > { > EFI_STATUS Status; > - UINT32 BlockSize = BlockIo->Media->BlockSize; > - EFI_LBA EndLBA = BlockIo->Media->LastBlock; > - EFI_LBA DescriptorLBAs[] = { 256, EndLBA - 256, EndLBA, 512 }; > + UINT32 BlockSize; > + EFI_LBA EndLBA; > + EFI_LBA DescriptorLBAs[4]; > UINTN Index; > > + BlockSize = BlockIo->Media->BlockSize; EndLBA = > + BlockIo->Media->LastBlock; DescriptorLBAs[0] = 256; > + DescriptorLBAs[1] = EndLBA - 256; DescriptorLBAs[2] = EndLBA; > + DescriptorLBAs[3] = 512; > + > for (Index = 0; Index < ARRAY_SIZE (DescriptorLBAs); Index++) { > Status = DiskIo->ReadDisk ( > DiskIo, > BlockIo->Media->MediaId, > MultU64x32 (DescriptorLBAs[Index], BlockSize), > -- > 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

