From fedec0a38ef252ad838fe6d6db3cc4d28c7d42dd Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Thu, 14 Sep 2017 10:44:59 +0800 Subject: [PATCH] MdeModulePkg/UdfDxe: Fix operands of different size in bitwise OP Cc: Paulo Alcantara Cc: Ruiyu Ni Cc: Star Zeng Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Paulo Alcantara Reviewed-by: Star Zeng --- MdeModulePkg/Universal/Disk/UdfDxe/File.c | 2 +- MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/File.c b/MdeModulePkg/Universal/Disk/UdfDxe/File.c index 82db75475b..4c2cf67fa3 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/File.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/File.c @@ -806,7 +806,7 @@ UdfGetInfo ( } if (Index < 128) { - *String |= *(UINT8 *)(OstaCompressed + Index); + *String |= (CHAR16)(*(UINT8 *)(OstaCompressed + Index)); } // diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index 02a73a9eb9..f63e7e660b 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c @@ -1782,7 +1782,7 @@ GetFileNameFromFid ( } if (Index < Length) { - *FileName |= OstaCompressed[Index]; + *FileName |= (CHAR16)(OstaCompressed[Index]); } FileName++; @@ -1918,7 +1918,7 @@ ResolveSymlink ( } if (Index < Length) { - *C |= *(UINT8 *)((UINT8 *)PathComp->ComponentIdentifier + Index); + *C |= (CHAR16)(*(UINT8 *)((UINT8 *)PathComp->ComponentIdentifier + Index)); } C++;