public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Hao Wu <hao.a.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>, Paulo Alcantara <pcacjr@zytor.com>,
	Ruiyu Ni <ruiyu.ni@intel.com>, Star Zeng <star.zeng@intel.com>,
	Eric Dong <eric.dong@intel.com>
Subject: [PATCH 2/7] MdeModulePkg/UdfDxe: Fix operands of different size in bitwise OP
Date: Fri, 15 Sep 2017 12:57:48 +0800	[thread overview]
Message-ID: <20170915045753.588-3-hao.a.wu@intel.com> (raw)
In-Reply-To: <20170915045753.588-1-hao.a.wu@intel.com>

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



  parent reply	other threads:[~2017-09-15  4:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15  4:57 [PATCH 0/7] MdeModulePkg/Udf: Code refinements Hao Wu
2017-09-15  4:57 ` [PATCH 1/7] MdeModulePkg/UdfDxe: Add checks to ensure no possible NULL ptr deref Hao Wu
2017-09-15  4:57 ` Hao Wu [this message]
2017-09-15  4:57 ` [PATCH 3/7] MdeModulePkg/UdfDxe: Use compare operator for non-boolean comparisons Hao Wu
2017-09-15  4:57 ` [PATCH 4/7] MdeModulePkg/Udf: Refine function description comments Hao Wu
2017-09-15  4:57 ` [PATCH 5/7] MdeModulePkg/UdfDxe: Avoid short (single character) variable name Hao Wu
2017-09-15  4:57 ` [PATCH 6/7] MdeModulePkg/Udf: Avoid declaring and initializing local GUID variable Hao Wu
2017-09-15  4:57 ` [PATCH 7/7] MdeModulePkg/UdfDxe: Refine enum member naming style Hao Wu
2017-09-15 21:47 ` [PATCH 0/7] MdeModulePkg/Udf: Code refinements Paulo Alcantara
2017-09-19  3:30   ` Zeng, Star
2017-09-19  3:36     ` Wu, Hao A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170915045753.588-3-hao.a.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox