Hi,
On 9/14/2017 7:53 AM, Star Zeng wrote:
VS2010/VS2012 build failure with below info:
warning C4701:
potentially uninitialized local variable 'DataOffset' used
potentially uninitialized local variable 'FilePosition' used
potentially uninitialized local variable 'FinishedSeeking' used
potentially uninitialized local variable 'Data' used
warning C4703:
potentially uninitialized local pointer variable 'Data' used
In fact, DataOffset, FilePosition and FinishedSeeking are initialized
and then used if (ReadFileInfo->Flags == READ_FILE_SEEK_AND_READ).
DoFreeAed will be set to TRUE when Data is allocated and returned from
GetAedAdsData(), and Data will be freed if (DoFreeAed) when exiting.
Use same method at 5afa5b815936e2b45a375b6521764195bed68680 to fix
the build failure.
There is related discussion at
https://lists.01.org/pipermail/edk2-devel/2017-September/014641.html
Cc: Laszlo Ersek <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Paulo Alcantara <[email protected]>
Cc: Ruiyu Ni <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Dandan Bi <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <[email protected]>
---
MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 4 ++++
1 file changed, 4 insertions(+)
With your patch, NT32 X64 build passes with VS2012. Thanks!
Reviewed-by: Paulo Alcantara <[email protected]>
Paulo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel