Revision: 16558
          http://sourceforge.net/p/edk2/code/16558
Author:   erictian
Date:     2014-12-25 07:08:02 +0000 (Thu, 25 Dec 2014)
Log Message:
-----------
MdeModulePkg/FvSimpleFileSystem: Fix building error with 32bit tool chains.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Feng Tian <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c

Modified: 
trunk/edk2/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c
===================================================================
--- 
trunk/edk2/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c    
    2014-12-24 02:41:04 UTC (rev 16557)
+++ 
trunk/edk2/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c    
    2014-12-25 07:08:02 UTC (rev 16558)
@@ -139,7 +139,7 @@
     //
     // 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 @@
                            EFI_SECTION_RAW,
                            0,
                            &IgnoredPtr,
-                           &FvFileInfo->FileInfo.FileSize,
+                           (UINTN*)&FvFileInfo->FileInfo.FileSize,
                            &AuthenticationStatus
                            );
     if (Status == EFI_WARN_BUFFER_TOO_SMALL) {
@@ -167,7 +167,7 @@
                            FvProtocol,
                            &FvFileInfo->NameGuid,
                            NULL,
-                           &FvFileInfo->FileInfo.FileSize,
+                           (UINTN*)&FvFileInfo->FileInfo.FileSize,
                            &FoundType,
                            &Attributes,
                            &AuthenticationStatus
@@ -181,7 +181,7 @@
                          FvProtocol,
                          &FvFileInfo->NameGuid,
                          NULL,
-                         &FvFileInfo->FileInfo.FileSize,
+                         (UINTN*)&FvFileInfo->FileInfo.FileSize,
                          &FoundType,
                          &Attributes,
                          &AuthenticationStatus
@@ -303,7 +303,7 @@
 {
   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 @@
       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 @@
     }
 
     if (*BufferSize + File->Position > FileSize) {
-      *BufferSize = FileSize - File->Position;
+      *BufferSize = (UINTN)(FileSize - File->Position);
     }
 
     CopyMem (Buffer, (UINT8*)FileBuffer + File->Position, *BufferSize);


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to