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.39; 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-oln040092067039.outbound.protection.outlook.com [40.92.67.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2DCBC22352281 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=U8zQsbD4Ue8cjSlKsxCwqPvNWIVoeS7IccYfeLIkTdQ=; b=kP5knzOJdEQeLL+fm/akpdH8sFgZlCHf8oxXK5NibWGxovRcFIMM7H3GhUeZWxTRBXT/n9qLuHUchdwkAtWTrHPKlsEKo+QapIeBy22AX4WHFcHAl8M2t02lKmhlj0TUL18eGMHVoa6mGTMsZpbxHNpP2HYSeBdFHDoaNKtvet5W1RyYDDhwHJeyUZRJ4dtlbtfcu8MzAQwJGL40xB0aDdUXEaRBSc0RBvPh0tYvhr41FU926G5AQRow2HvbzY/jXCGU0Zyaso4cnwwR6y2acHbHlxzBCXjJSzmJSuun+XG4WVGIzZ5fnrRotSfZZ4RTS1Q28CmBzAI/v08mNM7+oQ== Received: from VE1EUR02FT055.eop-EUR02.prod.protection.outlook.com (10.152.12.55) by VE1EUR02HT031.eop-EUR02.prod.protection.outlook.com (10.152.13.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.485.12; Tue, 27 Feb 2018 16:49:56 +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:56 +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:55 +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 1/2] MdeModulePkg/PciBusDxe: Prevent truncating constant values. Thread-Index: AQHTr+r+7H7m2gtni0y5cHZd6wzzNw== Date: Tue, 27 Feb 2018 16:49:55 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:271A7149E74174E81D15209CB479F272EF66D0336097096F00C6D512BF9F683D; UpperCasedChecksum:D952795799D001091580AFD7C9EA9D5DC3AB0CFFB89E905D889850357F8D715A; SizeAsReceived:7144; Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [MZtR8glPnT2wurVxHS5rTLm1Dio5OaOZ] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR02HT031; 6:2vhb8nezCNsLHQcJWX/c1t0qcfLUZvp8xOd1hVaTUTT6r3z0/Yh9caq48K+Tp9XN+4FMptd/XbUeJjAJiE1r+aWWuqcOw4zPGg6qgPWBhTi3VNPe6jdGhKHH4tQ3/cA21Em6o8hp8RxEjR6fz3yc19ZNKvS6y2dnPVgMfw41M/pBbeNmE6868GbrXNTzKt9/2K5rukncEQJRf/624oRms/uYJfT/AjfwlAuaqih4djfV34NVSau0Y3f4KySpXEFtQ1YFq7Cmb0zGWHSaAK1Drlddc2+qEyoypTUsIekM66D3iovEdHZwfTP89Zn90rWu6uQh+NmN/QKhthCHioo1eUM9BLHOkzLltKhNl4EizCU=; 5:z3Ay++bJzGaAr+puMGuxT9yllaYgVEBL0zR/vFF7xtk3KjgsBHGIRGQJA7EpiM8PxZ2QEVFeoTUMQWM07n+2Km6lI4siZhNezTLoCEG2V80pb1cX7Got9hzSvCiQJBG/XF8Q5/TaLpS5jcqnkL9RbA1RyLmW8QtfKV7BAAZD2TE=; 24:AJmkmgZw9nOnOE5k5STAGK/1aZhLI7K//lLmiHY/Ef43UjRPd+ipN2bNtgSz4+aok3zrfLIrJ/h2FmT3J+VERinUj3J3uIrYcSa9Dcxne2s=; 7:oH/es+QpxQSzltDsOfvLf2Gl0E6vAlP8LUy1zi0BEakHLk9xYK2LmGGtoeO8uBWU2tjTQcwvCZI9Qb+dgsnvz8BBMS0SXo77qt74JvHKhN4qiHecbVp3ubYDxPLUIciLzP5vg/cJK1IBAjmxCs85hu04K59EwX4BiG0/Gs5+2pdKoM6OLZOFyLFtzW5m1I88ZPkmFmG4SpdIdtc32FAOZW8xcufEgJXGlosIi8+DQkDgB9o69XzZ1fDMagJovNJZ x-incomingheadercount: 45 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:VE1EUR02HT031; x-ms-traffictypediagnostic: VE1EUR02HT031: x-ms-office365-filtering-correlation-id: 71f338dd-b679-4b0a-cf5d-08d57e0220ff x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:VE1EUR02HT031; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR02HT031; x-forefront-prvs: 05961EBAFC x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR02HT031; 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: 71f338dd-b679-4b0a-cf5d-08d57e0220ff X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2018 16:49:55.7244 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT031 Subject: [PATCH 1/2] MdeModulePkg/PciBusDxe: 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:52 -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/Bus/Pci/PciBusDxe/PciResourceSupport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c b/MdeModul= ePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c index 2f713fcee95e..a752853f3e9e 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c @@ -1936,7 +1936,7 @@ ProgramP2C ( &BridgeControl ); =20 - BridgeControl &=3D (UINT16) ~PCI_CARD_PREFETCHABLE_MEMORY_0_ENABLE; + BridgeControl &=3D (UINT16) ~(UINT16)PCI_CARD_PREFETCHABLE_MEMORY_0_= ENABLE; PciIo->Pci.Write ( PciIo, EfiPciIoWidthUint16, @@ -2005,7 +2005,7 @@ ProgramP2C ( &BridgeControl ); =20 - BridgeControl &=3D (UINT16) ~(PCI_CARD_PREFETCHABLE_MEMORY_1_ENABLE)= ; + BridgeControl &=3D (UINT16) ~(UINT16)(PCI_CARD_PREFETCHABLE_MEMORY_1= _ENABLE); PciIo->Pci.Write ( PciIo, EfiPciIoWidthUint16, --=20 2.16.0.windows.2