From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 1BF7121B06E9B for ; Thu, 10 Aug 2017 03:35:49 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Aug 2017 03:38:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,352,1498546800"; d="scan'208";a="138598671" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 10 Aug 2017 03:38:07 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 10 Aug 2017 03:38:07 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 10 Aug 2017 02:48:58 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.183]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.114]) with mapi id 14.03.0319.002; Thu, 10 Aug 2017 17:48:57 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , Andrew Fish Thread-Topic: [edk2] [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined Thread-Index: AQHTDDbpafxRQ/JyPU2pjuB2qk/AXKJ9Y1Lw Date: Thu, 10 Aug 2017 09:48:56 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D76DA67@shsmsx102.ccr.corp.intel.com> References: <1501750792-31020-1-git-send-email-yonghong.zhu@intel.com> <1501750792-31020-2-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1501750792-31020-2-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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, 10 Aug 2017 10:35:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yo= nghong Zhu > Sent: Thursday, August 3, 2017 5:00 PM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Andrew Fish ; Gao, Liming > Subject: [edk2] [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bi= t left shift as undefined >=20 > Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=3D635 >=20 > 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(-) >=20 > 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: >=20 > Returns: (VOID) >=20 > --*/ > { > - Sd->mBitBuf =3D (UINT32) (Sd->mBitBuf << NumOfBits); > + Sd->mBitBuf =3D (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits); >=20 > while (NumOfBits > Sd->mBitCount) { >=20 > - Sd->mBitBuf |=3D (UINT32) (Sd->mSubBitBuf << (NumOfBits =3D (UINT16)= (NumOfBits - Sd->mBitCount))); > + Sd->mBitBuf |=3D (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = =3D (UINT16) (NumOfBits - Sd->mBitCount))); >=20 > 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: >=20 > Returns: (VOID) >=20 > --*/ > { > - Sd->mBitBuf =3D (UINT32) (Sd->mBitBuf << NumOfBits); > + Sd->mBitBuf =3D (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits); >=20 > while (NumOfBits > Sd->mBitCount) { >=20 > - Sd->mBitBuf |=3D (UINT32) (Sd->mSubBitBuf << (NumOfBits =3D (UINT16)= (NumOfBits - Sd->mBitCount))); > + Sd->mBitBuf |=3D (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = =3D (UINT16) (NumOfBits - Sd->mBitCount))); >=20 > if (Sd->mCompSize > 0) { > // > // Get 1 byte into SubBitBuf > // > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel