From: Yonghong Zhu <yonghong.zhu@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Andrew Fish <afish@apple.com>
Subject: [Patch 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined
Date: Wed, 2 Aug 2017 17:28:02 +0800 [thread overview]
Message-ID: <1501666085-21208-2-git-send-email-yonghong.zhu@intel.com> (raw)
In-Reply-To: <1501666085-21208-1-git-send-email-yonghong.zhu@intel.com>
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
---
BaseTools/Source/C/Common/Decompress.c | 4 ++--
BaseTools/Source/C/TianoCompress/TianoCompress.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/BaseTools/Source/C/Common/Decompress.c b/BaseTools/Source/C/Common/Decompress.c
index 4b83e88..b2049bd 100644
--- a/BaseTools/Source/C/Common/Decompress.c
+++ b/BaseTools/Source/C/Common/Decompress.c
@@ -87,15 +87,15 @@ Arguments:
Returns: (VOID)
--*/
{
- Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
+ Sd->mBitBuf = (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits);
while (NumOfBits > Sd->mBitCount) {
- Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
+ Sd->mBitBuf |= (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
if (Sd->mCompSize > 0) {
//
// Get 1 byte into SubBitBuf
//
diff --git a/BaseTools/Source/C/TianoCompress/TianoCompress.c b/BaseTools/Source/C/TianoCompress/TianoCompress.c
index f810511..046fb36 100644
--- a/BaseTools/Source/C/TianoCompress/TianoCompress.c
+++ b/BaseTools/Source/C/TianoCompress/TianoCompress.c
@@ -2064,15 +2064,15 @@ Arguments:
Returns: (VOID)
--*/
{
- Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
+ Sd->mBitBuf = (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits);
while (NumOfBits > Sd->mBitCount) {
- Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
+ Sd->mBitBuf |= (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
if (Sd->mCompSize > 0) {
//
// Get 1 byte into SubBitBuf
//
--
2.6.1.windows.1
next parent reply other threads:[~2017-08-02 9:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1501666085-21208-1-git-send-email-yonghong.zhu@intel.com>
2017-08-02 9:28 ` Yonghong Zhu [this message]
2017-08-02 9:28 ` [Patch 2/4] DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined Yonghong Zhu
2017-08-03 1:42 ` Ni, Ruiyu
2017-08-03 18:26 ` Richardson, Brian
2017-08-02 9:28 ` [Patch 3/4] IntelFrameworkModulePkg: " Yonghong Zhu
2017-08-02 9:28 ` [Patch 4/4] MdePkg: " Yonghong Zhu
2017-08-02 14:04 ` Marvin H?user
2017-08-02 13:47 ` [Patch 0/4] Fix Xcode 9 Beta treating 32-bit left shift as undefined behavior Zhu, Yonghong
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=1501666085-21208-2-git-send-email-yonghong.zhu@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