From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 B0DA221A13499 for ; Thu, 18 May 2017 10:03:13 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 May 2017 10:03:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,359,1491289200"; d="scan'208";a="263642447" Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.56.31]) by fmsmga004.fm.intel.com with ESMTP; 18 May 2017 10:03:12 -0700 From: Michael Kinney To: edk2-devel@lists.01.org Cc: Ruiyu Ni , Andrew Fish , Laszlo Ersek , Michael D Kinney Date: Thu, 18 May 2017 10:03:09 -0700 Message-Id: <1495126989-21904-1-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 Subject: [Patch] PcAtChipsetPkg/SerialIoLib: Remove negative value shift 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, 18 May 2017 17:03:13 -0000 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. Cc: Ruiyu Ni Cc: Andrew Fish Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney --- PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c b/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c index 95e0db7..0a2e20c 100644 --- a/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c +++ b/PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c @@ -102,7 +102,7 @@ SerialPortInitialize ( // // Switch back to bank 0 // - OutputData = (UINT8) ((~DLAB << 7) | (gBreakSet << 6) | (gParity << 3) | (gStop << 2) | Data); + OutputData = (UINT8) ( (gBreakSet << 6) | (gParity << 3) | (gStop << 2) | Data); IoWrite8 (gUartBase + LCR_OFFSET, OutputData); return RETURN_SUCCESS; @@ -481,7 +481,7 @@ SerialPortSetAttributes ( // // Switch back to bank 0 // - OutputData = (UINT8) ((~DLAB << 7) | (gBreakSet << 6) | (LcrParity << 3) | (LcrStop << 2) | LcrData); + OutputData = (UINT8) ((gBreakSet << 6) | (LcrParity << 3) | (LcrStop << 2) | LcrData); IoWrite8 (gUartBase + LCR_OFFSET, OutputData); return RETURN_SUCCESS; -- 2.6.3.windows.1