Reviewed-by: Liming Gao <liming....@intel.com>
> -----Original Message----- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Yonghong Zhu > Sent: Thursday, August 3, 2017 5:00 PM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Andrew Fish > <af...@apple.com>; Gao, Liming <liming....@intel.com> > Subject: [edk2] [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit > left shift as undefined > > Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 > > Cc: Liming Gao <liming....@intel.com> > Cc: Michael D Kinney <michael.d.kin...@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Andrew Fish <af...@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 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel