From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7AD8521E87985 for ; Sun, 10 Sep 2017 22:42:36 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 10 Sep 2017 22:45:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,376,1500966000"; d="scan'208";a="133919259" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga002.jf.intel.com with ESMTP; 10 Sep 2017 22:45:30 -0700 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Eric Dong , Paulo Alcantara , Ruiyu Ni , Star Zeng Date: Mon, 11 Sep 2017 13:44:40 +0800 Message-Id: <1505108680-375928-4-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1505108680-375928-1-git-send-email-dandan.bi@intel.com> References: <1505108680-375928-1-git-send-email-dandan.bi@intel.com> Subject: [patch 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2017 05:42:36 -0000 Cc: Eric Dong Cc: Paulo Alcantara Cc: Ruiyu Ni Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- .../Universal/Disk/UdfDxe/FileSystemOperations.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index 03fda16..f4ebf1f 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c @@ -521,11 +521,11 @@ DuplicateFid ( OUT UDF_FILE_IDENTIFIER_DESCRIPTOR **NewFileIdentifierDesc ) { *NewFileIdentifierDesc = (UDF_FILE_IDENTIFIER_DESCRIPTOR *)AllocateCopyPool ( - GetFidDescriptorLength (FileIdentifierDesc), FileIdentifierDesc); + (UINTN) GetFidDescriptorLength (FileIdentifierDesc), FileIdentifierDesc); } // // Duplicate either a given File Entry or a given Extended File Entry. // @@ -858,20 +858,20 @@ GetAedAdsData ( } // // Allocate buffer to read in AED's data. // - *Data = AllocatePool (*Length); + *Data = AllocatePool ((UINTN) (*Length)); if (*Data == NULL) { return EFI_OUT_OF_RESOURCES; } return DiskIo->ReadDisk ( DiskIo, BlockIo->Media->MediaId, Offset, - *Length, + (UINTN) (*Length), *Data ); } // @@ -893,11 +893,11 @@ GrowUpBufferToNextAd ( *Buffer = AllocatePool (ExtentLength); if (*Buffer == NULL) { return EFI_OUT_OF_RESOURCES; } } else { - *Buffer = ReallocatePool (Length, Length + ExtentLength, *Buffer); + *Buffer = ReallocatePool ((UINTN) Length, (UINTN) (Length + ExtentLength), *Buffer); if (*Buffer == NULL) { return EFI_OUT_OF_RESOURCES; } } @@ -982,29 +982,29 @@ ReadFile ( ReadFileInfo->ReadLength = Length; } else if (ReadFileInfo->Flags == READ_FILE_ALLOCATE_AND_READ) { // // Allocate buffer for starting read data. // - ReadFileInfo->FileData = AllocatePool (Length); + ReadFileInfo->FileData = AllocatePool ((UINTN) Length); if (ReadFileInfo->FileData == NULL) { return EFI_OUT_OF_RESOURCES; } // // Read all inline data into ReadFileInfo->FileData // - CopyMem (ReadFileInfo->FileData, Data, Length); + CopyMem (ReadFileInfo->FileData, Data, (UINTN) Length); ReadFileInfo->ReadLength = Length; } else if (ReadFileInfo->Flags == READ_FILE_SEEK_AND_READ) { // // If FilePosition is non-zero, seek file to FilePosition, read // FileDataSize bytes and then updates FilePosition. // CopyMem ( ReadFileInfo->FileData, (VOID *)((UINT8 *)Data + ReadFileInfo->FilePosition), - ReadFileInfo->FileDataSize + (UINTN) ReadFileInfo->FileDataSize ); ReadFileInfo->FilePosition += ReadFileInfo->FileDataSize; } else { ASSERT (FALSE); @@ -1125,11 +1125,11 @@ ReadFile ( } if (FilePosition + ExtentLength > ReadFileInfo->FilePosition) { Offset = ReadFileInfo->FilePosition - FilePosition; if (Offset < 0) { - Offset = -(Offset); + Offset = - (INT64) (Offset); } } else { Offset = 0; } @@ -1153,11 +1153,11 @@ ReadFile ( // Status = DiskIo->ReadDisk ( DiskIo, BlockIo->Media->MediaId, Offset + MultU64x32 (Lsn, LogicalBlockSize), - DataLength, + (UINTN) DataLength, (VOID *)((UINT8 *)ReadFileInfo->FileData + DataOffset) ); if (EFI_ERROR (Status)) { goto Error_Read_Disk_Blk; -- 1.9.5.msysgit.1