[edk2] [PATCH 2/7] MdeModulePkg/UdfDxe: Fix operands of different size in bitwise OP

Hao Wu posted 7 patches 7 years, 3 months ago
[edk2] [PATCH 2/7] MdeModulePkg/UdfDxe: Fix operands of different size in bitwise OP
Posted by Hao Wu 7 years, 3 months ago
Cc: Paulo Alcantara <pcacjr@zytor.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 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++;
-- 
2.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel