Reviewed-by: Ruiyu Ni <[email protected]> Thanks/Ray
> -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of > Dandan Bi > Sent: Tuesday, September 12, 2017 4:56 PM > To: [email protected] > Cc: Ni, Ruiyu <[email protected]>; Dong, Eric <[email protected]>; Zeng, > Star <[email protected]> > Subject: [edk2] [PATCH v3 3/3] MdeModulePkg/PartitionDxe: 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/PartitionDxe/Udf.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c > b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c > index c1d4480..3174ab2 100644 > --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c > +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c > @@ -46,15 +46,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 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

