From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 E96C821AEB0A6 for ; Thu, 3 Aug 2017 01:57:45 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Aug 2017 01:59:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,315,1498546800"; d="scan'208";a="134892573" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by fmsmga005.fm.intel.com with ESMTP; 03 Aug 2017 01:59:56 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao , Michael D Kinney , Andrew Fish Date: Thu, 3 Aug 2017 16:59:49 +0800 Message-Id: <1501750792-31020-2-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 In-Reply-To: <1501750792-31020-1-git-send-email-yonghong.zhu@intel.com> References: <1501750792-31020-1-git-send-email-yonghong.zhu@intel.com> Subject: [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined 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: Thu, 03 Aug 2017 08:57:46 -0000 Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- 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