diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index 199c4ca2db..9ec81a6cdc 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c @@ -893,6 +893,11 @@ ReadFile ( LogicalBlockSize = LV_BLOCK_SIZE (Volume, UDF_DEFAULT_LV_NUM); DoFreeAed = FALSE; + // + // set BytesLeft to suppress incorrect compiler/analyzer warnings + // + BytesLeft = 0; + switch (ReadFileInfo->Flags) { case READ_FILE_GET_FILESIZE: case READ_FILE_ALLOCATE_AND_READ: