From 270fc03f3e0c4d446926d490f1f9bb9ae0f2cf27 Mon Sep 17 00:00:00 2001 From: Feng Tian Date: Thu, 25 Dec 2014 07:08:02 +0000 Subject: MdeModulePkg/FvSimpleFileSystem: Fix building error with 32bit tool chains. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16558 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'MdeModulePkg/Universal') diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c index 9661cfd132..d3f447a321 100644 --- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c +++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c @@ -139,7 +139,7 @@ FvFsGetFileSize ( // // Get the size of the first executable section out of the file. // - Status = FvFsFindExecutableSection (FvProtocol, FvFileInfo, &FvFileInfo->FileInfo.FileSize, &IgnoredPtr); + Status = FvFsFindExecutableSection (FvProtocol, FvFileInfo, (UINTN*)&FvFileInfo->FileInfo.FileSize, &IgnoredPtr); if (Status == EFI_WARN_BUFFER_TOO_SMALL) { return EFI_SUCCESS; } @@ -153,7 +153,7 @@ FvFsGetFileSize ( EFI_SECTION_RAW, 0, &IgnoredPtr, - &FvFileInfo->FileInfo.FileSize, + (UINTN*)&FvFileInfo->FileInfo.FileSize, &AuthenticationStatus ); if (Status == EFI_WARN_BUFFER_TOO_SMALL) { @@ -167,7 +167,7 @@ FvFsGetFileSize ( FvProtocol, &FvFileInfo->NameGuid, NULL, - &FvFileInfo->FileInfo.FileSize, + (UINTN*)&FvFileInfo->FileInfo.FileSize, &FoundType, &Attributes, &AuthenticationStatus @@ -181,7 +181,7 @@ FvFsGetFileSize ( FvProtocol, &FvFileInfo->NameGuid, NULL, - &FvFileInfo->FileInfo.FileSize, + (UINTN*)&FvFileInfo->FileInfo.FileSize, &FoundType, &Attributes, &AuthenticationStatus @@ -303,7 +303,7 @@ FvFsGetFileInfo ( { UINTN InfoSize; - InfoSize = FvFileInfo->FileInfo.Size; + InfoSize = (UINTN)FvFileInfo->FileInfo.Size; if (*BufferSize < InfoSize) { *BufferSize = InfoSize; return EFI_BUFFER_TOO_SMALL; @@ -650,7 +650,7 @@ FvSimpleFileSystemRead ( return EFI_SUCCESS; } } else { - FileSize = File->FvFileInfo->FileInfo.FileSize; + FileSize = (UINTN)File->FvFileInfo->FileInfo.FileSize; FileBuffer = AllocateZeroPool (FileSize); if (FileBuffer == NULL) { @@ -663,7 +663,7 @@ FvSimpleFileSystemRead ( } if (*BufferSize + File->Position > FileSize) { - *BufferSize = FileSize - File->Position; + *BufferSize = (UINTN)(FileSize - File->Position); } CopyMem (Buffer, (UINT8*)FileBuffer + File->Position, *BufferSize); -- cgit v1.2.3