From patchwork Fri Jul 15 08:14:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 72071 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp488796qga; Fri, 15 Jul 2016 01:14:32 -0700 (PDT) X-Received: by 10.98.89.23 with SMTP id n23mr19497837pfb.34.1468570472675; Fri, 15 Jul 2016 01:14:32 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id xa6si7933001pab.117.2016.07.15.01.14.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2016 01:14:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 497531A1F2E; Fri, 15 Jul 2016 01:15:18 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 E265E1A1F2E for ; Fri, 15 Jul 2016 01:15:16 -0700 (PDT) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93ECC112DA3; Fri, 15 Jul 2016 08:14:29 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-38.phx2.redhat.com [10.3.116.38]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6F8EJtR001706; Fri, 15 Jul 2016 04:14:28 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Fri, 15 Jul 2016 10:14:15 +0200 Message-Id: <1468570456-15031-5-git-send-email-lersek@redhat.com> In-Reply-To: <1468570456-15031-1-git-send-email-lersek@redhat.com> References: <1468570456-15031-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 15 Jul 2016 08:14:29 +0000 (UTC) Subject: [edk2] [PATCH 4/5] OvmfPkg/PciHostBridgeLib: silence IA32 VS2015x86 warnings X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Jordan Justen MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" When compiling "OvmfPkg\Library\PciHostBridgeLib\XenSupport.c" for IA32, the VS2015x86 compiler emits the following: > XenSupport.c(41): error C2220: warning treated as error - no 'object' > file generated > XenSupport.c(41): warning C4244: 'function': conversion from 'UINT64' to > 'UINTN', possible loss of data > XenSupport.c(48): warning C4244: 'function': conversion from 'UINT64' to > 'UINTN', possible loss of data > XenSupport.c(49): warning C4244: 'function': conversion from 'UINT64' to > 'UINTN', possible loss of data > XenSupport.c(50): warning C4244: 'function': conversion from 'UINT64' to > 'UINTN', possible loss of data > XenSupport.c(222): warning C4244: 'function': conversion from 'UINT64' > to 'UINTN', possible loss of data > XenSupport.c(241): warning C4244: 'function': conversion from 'UINT64' > to 'UINTN', possible loss of data PciLib functions take UINTN addresses that were encoded with the PCI_LIB_ADDRESS() macro. We carry addresses from the macro invocations to the function calls in two UINT64 variables however. This loses no data, but it alerts VS2015x86. Change the variable types to UINTN. Cc: Jordan Justen Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/Library/PciHostBridgeLib/XenSupport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c index 21896637e051..31c63ae19e0a 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c +++ b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c @@ -30,7 +30,7 @@ STATIC VOID PcatPciRootBridgeBarExisted ( - IN UINT64 Address, + IN UINTN Address, OUT UINT32 *OriginalValue, OUT UINT32 *Value ) @@ -180,7 +180,7 @@ ScanForRootBridges ( UINT8 Device; UINT8 Function; UINTN NumberOfDevices; - UINT64 Address; + UINTN Address; PCI_TYPE01 Pci; UINT64 Attributes; UINT64 Base;