audk/MdeModulePkg/Universal/Disk/UdfDxe
Laszlo Ersek 5afa5b8159 MdeModulePkg/UdfDxe: suppress incorrect compiler warning in ReadFile()
When building the driver for DEBUG/RELEASE, GCC48/GCC49 warn about
ReadFile() possibly using "BytesLeft" without initializing it first.

This is not the case. The reads of "BytesLeft" are only reachable if
(ReadFileInfo->Flags == READ_FILE_SEEK_AND_READ). But, in that case, we
also set "BytesLeft" to "ReadFileInfo->FileDataSize", near the top of the
function.

Assign "BytesLeft" zero at the top, and add a comment that conforms to the
pending Coding Style Spec feature request at
<https://bugzilla.tianocore.org/show_bug.cgi?id=607>.

This issue was reported by Ard's and Gerd's CI systems independently.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
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>
Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
2017-09-14 00:05:20 +02:00
..
ComponentName.c MdeModulePkg: Initial UDF/ECMA-167 file system support 2017-09-08 20:42:49 +02:00
File.c MdeModulePkg/UdfDxe: replace zero-init of local variables with ZeroMem() 2017-09-12 12:12:26 +02:00
FileName.c MdeModulePkg: Initial UDF/ECMA-167 file system support 2017-09-08 20:42:49 +02:00
FileSystemOperations.c MdeModulePkg/UdfDxe: suppress incorrect compiler warning in ReadFile() 2017-09-14 00:05:20 +02:00
Udf.c MdeModulePkg: Initial UDF/ECMA-167 file system support 2017-09-08 20:42:49 +02:00
Udf.h MdeModulePkg: Initial UDF/ECMA-167 file system support 2017-09-08 20:42:49 +02:00
UdfDxe.inf MdeModulePkg: Initial UDF/ECMA-167 file system support 2017-09-08 20:42:49 +02:00