From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.67.22; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067022.outbound.protection.outlook.com [40.92.67.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CB66B22352284 for ; Tue, 27 Feb 2018 08:43:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1dqSMXaZAEWe8EZfDihToIK04OMx3rH6YYgDmCpth8E=; b=DOTGTBkJcyeOreKCJUArHYloXI55CueE5RGO0EeYLjEvguyet0BVzcPPOT574A9NMiKwmSDx5jsm6WTAnEluShBIJ1yeE9FloAspYAjGfmbAHzJ5sgZrtnmST4QnaQ9qyFjnmCmDWfHSoiE4fyiqE+6ddzaVgWw/aAegdXWsein9GC5b0sXE6ViCHYJBDW4EkwzglTHzbicv5C0R0Wu1CXV0p7VJHX08L5j398oGH6106nd+9o9pC+LCUP5mK8pDnwkuidg94EHhoVWfZdSlahX+5Tfhkd3C7aROURNppGO2IjLUWbH905yDqqGHitm4vMan2g9/kdQ014BkQvlWhw== Received: from VE1EUR02FT055.eop-EUR02.prod.protection.outlook.com (10.152.12.60) by VE1EUR02HT049.eop-EUR02.prod.protection.outlook.com (10.152.13.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Tue, 27 Feb 2018 16:49:57 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.12.60) by VE1EUR02FT055.mail.protection.outlook.com (10.152.13.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15 via Frontend Transport; Tue, 27 Feb 2018 16:49:57 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::7d81:9d96:1051:d20d]) by AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::7d81:9d96:1051:d20d%14]) with mapi id 15.20.0527.021; Tue, 27 Feb 2018 16:49:56 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "star.zeng@intel.com" , "eric.dong@intel.com" , "ruiyu.ni@intel.com" Thread-Topic: [PATCH 2/2] MdeModulePkg/BaseSerialPortLib16550: Prevent truncating constant values. Thread-Index: AQHTr+r/h8quN+BTR0iuq0O4ldSceA== Date: Tue, 27 Feb 2018 16:49:56 +0000 Message-ID: References: <20180227164940.6956-1-Marvin.Haeuser@outlook.com> In-Reply-To: <20180227164940.6956-1-Marvin.Haeuser@outlook.com> Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:7D1AD2B531A5A7DF024B077DCA673BAB1784C6B4728C62F35FB7EBB2CC0D1273; UpperCasedChecksum:5B68C5001DA2560A2F585D59C1E103B8BFBD89B6B2CF91EC98D4344AB0D4F5A7; SizeAsReceived:7298; Count:47 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [r+6O+1efoa39RSjPdxLYVUanjdnqTtA4] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR02HT049; 6:qEI+mnomYYDHNb2ncNj5SZDkRU/16+laaB8z3zxbJ8Ay8yU8MrQKMxewzauTLjjlVvA/QNgftsYKLyJXWfK93Ks0yVeMmSkhmRvHeDn/zTzHiotimTUHMPn2i1kuYNFVbWoNY2hVyKODW7yJO0BbyTAY9fR6keEGQTOEyMO4f7l9x3PaiRcXjaE8zNclnDrYJHX7q0Pqm2gFqMBx97UGkBV+oG4Ul7ompuzuxlZRA8xjy70OEzgehWT9vT3IjQGoZUfwsA3YskFe33f/2SSvR+lCTGkPh0DgHgtnDxjfuEgA0x0AZOz2jGOmYKfvas2HOmQWJgupXxD0RNi3hTxneNwUsWrpU91Aku4/mVAOuAM=; 5:I2FCLw7rNlYvwbPkE4yp4yPq8lXuNicKk5WuFJPNhKJDnZ1dQwj6rsaeUOzIT1EYIUk+KqzH+/ULvv7Q+2pItzbXew/LwuxHdbFS/VkVhBmIpA1rCNn+61LPInX6KwxMEyrKW651LOfIy6Fs3sJLRojrIv5Ec7suFdPGFTAdc70=; 24:0afxLjOpOp7FDWttvr3dDjbEL00GKENmSjWKX4H0W9r/LqaTjxtbxAY7CgOQU6EcYyNgQXOV1xQrkk9SJCbAzQp3hI/cumTjFwUibuWiyWg=; 7:DbQxrcdCeY/HbDbHpGATFn4b0oUlanJNiK4iXsfxCuQ1aRkL2Q05K2vvzeFaTR5E0Is+Zf1yg7XNY7Sss76dlmxGQNDF7/fG1CD1zBC1KZbd4jwZL0dnxEM7W9PrpSlKXnD0HRErBUB2dxSvn3c4bxxuQoyWyvyangdfWps0fyxpSyRxih1lJ01f510t2P5z38G70YyeHhELQ8ZOYqnpCEPr3/toPc0xUuaVhEq1oIphQL7MOFJnufkPg2u2knxe x-incomingheadercount: 47 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125374)(1603101448)(1701031045); SRVR:VE1EUR02HT049; x-ms-traffictypediagnostic: VE1EUR02HT049: x-ms-office365-filtering-correlation-id: 667bb5d6-da84-4c46-8e40-08d57e02219f x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:VE1EUR02HT049; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR02HT049; x-forefront-prvs: 05961EBAFC x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR02HT049; H:AM4PR06MB1491.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 667bb5d6-da84-4c46-8e40-08d57e02219f X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2018 16:49:56.9432 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT049 Subject: [PATCH 2/2] MdeModulePkg/BaseSerialPortLib16550: Prevent truncating constant values. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2018 16:43:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The toolcahin VS2015x86 issues warnings when truncating constant values. Explicitely cast such to avoid it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser --- MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c | 4 += +-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib1= 6550.c b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550= .c index 0ccac96f419c..10eca6c0a7aa 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c @@ -366,7 +366,7 @@ GetSerialRegisterBase ( // if (DeviceInfo->PowerManagementStatusAndControlRegister !=3D 0x00) { if ((PciRead16 (PciLibAddress + DeviceInfo->PowerManagementStatusAndCo= ntrolRegister) & (BIT0 | BIT1)) !=3D 0x00) { - PciAnd16 (PciLibAddress + DeviceInfo->PowerManagementStatusAndContro= lRegister, (UINT16)~(BIT0 | BIT1)); + PciAnd16 (PciLibAddress + DeviceInfo->PowerManagementStatusAndContro= lRegister, (UINT16)~(UINT16)(BIT0 | BIT1)); // // If PCI UART was not in D0, then make sure FIFOs are enabled, but = do not reset FIFOs // @@ -402,7 +402,7 @@ GetSerialRegisterBase ( // if (DeviceInfo->PowerManagementStatusAndControlRegister !=3D 0x00) { if ((PciRead16 (PciLibAddress + DeviceInfo->PowerManagementStatusAnd= ControlRegister) & (BIT0 | BIT1)) !=3D 0x00) { - PciAnd16 (PciLibAddress + DeviceInfo->PowerManagementStatusAndCont= rolRegister, (UINT16)~(BIT0 | BIT1)); + PciAnd16 (PciLibAddress + DeviceInfo->PowerManagementStatusAndCont= rolRegister, (UINT16)~(UINT16)(BIT0 | BIT1)); } } =20 --=20 2.16.0.windows.2