diff options
author | Bi, Dandan <dandan.bi@intel.com> | 2017-09-12 16:56:15 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2017-09-12 17:22:06 +0800 |
commit | b434f7532770714b1683b73cd54b8a38d5674251 (patch) | |
tree | 35172768404ec8ffd6fa349af5f5ab8a90bbe4e5 /MdeModulePkg/Universal | |
parent | 0b4c8f003ade95f4eadb8cbe7efe16008368143e (diff) | |
download | edk2-b434f7532770714b1683b73cd54b8a38d5674251.tar.gz edk2-b434f7532770714b1683b73cd54b8a38d5674251.tar.bz2 edk2-b434f7532770714b1683b73cd54b8a38d5674251.zip |
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>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index 5c5b5e3765..904262a2ba 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c @@ -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,
|