From c6a6193d122a9cb0d11373b8fa43ce95724271f7 Mon Sep 17 00:00:00 2001 From: Sean Brogan Date: Fri, 7 Feb 2020 07:07:13 +0800 Subject: [PATCH] BaseTools/PcdValueCommon: Fix 64-bit host compiler error https://bugzilla.tianocore.org/show_bug.cgi?id=2496 Cc: Sean Brogan Cc: Bob Feng Cc: Liming Gao Signed-off-by: Michael D Kinney Reviewed-by: Bob Feng --- BaseTools/Source/C/Common/PcdValueCommon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c b/BaseTools/Source/C/Common/PcdValueCommon.c index 42e3581707..98023e8786 100644 --- a/BaseTools/Source/C/Common/PcdValueCommon.c +++ b/BaseTools/Source/C/Common/PcdValueCommon.c @@ -478,7 +478,7 @@ Returns: // // Read all of the file contents. // - BytesRead = fread (*FileBuffer, sizeof (UINT8), *FileSize, InputFile); + BytesRead = (UINT32)fread (*FileBuffer, sizeof (UINT8), *FileSize, InputFile); if (BytesRead != *FileSize * sizeof (UINT8)) { fprintf (stderr, "Error reading the input file %s\n", InputFileName); fclose (InputFile);