diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2017-05-02 17:23:22 -0700 |
---|---|---|
committer | Michael Kinney <michael.d.kinney@intel.com> | 2017-05-19 12:12:06 -0700 |
commit | bbd61de5dbc6ad146dc7250e9646cb662604b5f3 (patch) | |
tree | 955575ad4dff51a768db1d018e7340c2e45e13ca /BaseTools/Source/Python/Ecc/EccGlobalData.py | |
parent | da0df6ca8f8f118866e53c7fb770598c199993a6 (diff) | |
download | edk2-bbd61de5dbc6ad146dc7250e9646cb662604b5f3.tar.gz edk2-bbd61de5dbc6ad146dc7250e9646cb662604b5f3.tar.bz2 edk2-bbd61de5dbc6ad146dc7250e9646cb662604b5f3.zip |
PcAtChipsetPkg/SerialIoLib: Remove negative value shift
https://bugzilla.tianocore.org/show_bug.cgi?id=553
Remove left shift of negative values that always evaluate
to 0 to address build errors from the llvm/clang compiler
used in the XCODE5 tool chain.
Clang rightfully complains about left-shifting ~DLAB. DLAB is #defined
as 0x01 (an "int"), hence ~DLAB has value (-2) on all edk2 platforms.
Left-shifting a negative int is undefined behavior.
Rather than replacing ~DLAB with ~(UINT32)DLAB, realize that the nonzero
bits of (~(UINT32)DLAB << 7) would all be truncated away in the final
conversion to UINT8 anyway. So just remove (~DLAB << 7).
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'BaseTools/Source/Python/Ecc/EccGlobalData.py')
0 files changed, 0 insertions, 0 deletions