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 <eric.dong@intel.com>
Cc: Paulo Alcantara <pcacjr@zytor.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Bi, Dandan 2017-09-12 16:56:15 +08:00 committed by Star Zeng
parent 0b4c8f003a
commit b434f75327
1 changed files with 10 additions and 3 deletions

View File

@ -22,11 +22,18 @@ FindAnchorVolumeDescriptorPointer (
)
{
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,