]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools
[mirror_edk2.git] / MdeModulePkg / Universal / Disk / UdfDxe / FileSystemOperations.c
index 7d7f722188c5be79623282e5ea0ff6ee7fcacc71..5c5b5e3765af95444f37ade204e2bf1910e6a76c 100644 (file)
@@ -472,7 +472,7 @@ DuplicateFid (
 {\r
   *NewFileIdentifierDesc =\r
     (UDF_FILE_IDENTIFIER_DESCRIPTOR *)AllocateCopyPool (\r
-      GetFidDescriptorLength (FileIdentifierDesc), FileIdentifierDesc);\r
+      (UINTN) GetFidDescriptorLength (FileIdentifierDesc), FileIdentifierDesc);\r
 }\r
 \r
 //\r
@@ -809,7 +809,7 @@ GetAedAdsData (
   //\r
   // Allocate buffer to read in AED's data.\r
   //\r
-  *Data = AllocatePool (*Length);\r
+  *Data = AllocatePool ((UINTN) (*Length));\r
   if (*Data == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -818,7 +818,7 @@ GetAedAdsData (
     DiskIo,\r
     BlockIo->Media->MediaId,\r
     Offset,\r
-    *Length,\r
+    (UINTN) (*Length),\r
     *Data\r
     );\r
 }\r
@@ -844,7 +844,7 @@ GrowUpBufferToNextAd (
       return EFI_OUT_OF_RESOURCES;\r
     }\r
   } else {\r
-    *Buffer = ReallocatePool (Length, Length + ExtentLength, *Buffer);\r
+    *Buffer = ReallocatePool ((UINTN) Length, (UINTN) (Length + ExtentLength), *Buffer);\r
     if (*Buffer == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
@@ -933,7 +933,7 @@ ReadFile (
       //\r
       // Allocate buffer for starting read data.\r
       //\r
-      ReadFileInfo->FileData = AllocatePool (Length);\r
+      ReadFileInfo->FileData = AllocatePool ((UINTN) Length);\r
       if (ReadFileInfo->FileData == NULL) {\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
@@ -941,7 +941,7 @@ ReadFile (
       //\r
       // Read all inline data into ReadFileInfo->FileData\r
       //\r
-      CopyMem (ReadFileInfo->FileData, Data, Length);\r
+      CopyMem (ReadFileInfo->FileData, Data, (UINTN) Length);\r
       ReadFileInfo->ReadLength = Length;\r
     } else if (ReadFileInfo->Flags == READ_FILE_SEEK_AND_READ) {\r
       //\r
@@ -951,7 +951,7 @@ ReadFile (
       CopyMem (\r
         ReadFileInfo->FileData,\r
         (VOID *)((UINT8 *)Data + ReadFileInfo->FilePosition),\r
-        ReadFileInfo->FileDataSize\r
+        (UINTN) ReadFileInfo->FileDataSize\r
         );\r
 \r
       ReadFileInfo->FilePosition += ReadFileInfo->FileDataSize;\r
@@ -1099,7 +1099,7 @@ ReadFile (
           DiskIo,\r
           BlockIo->Media->MediaId,\r
           Offset + MultU64x32 (Lsn, LogicalBlockSize),\r
-          DataLength,\r
+          (UINTN) DataLength,\r
           (VOID *)((UINT8 *)ReadFileInfo->FileData +\r
                    DataOffset)\r
           );\r