From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: Void lookup limit of 2 exceeded) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 A9F0021B00DDB for ; Tue, 21 Nov 2017 18:36:46 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2017 18:41:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,435,1505804400"; d="scan'208";a="5605446" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 21 Nov 2017 18:41:01 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 21 Nov 2017 18:41:01 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 21 Nov 2017 18:41:01 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Wed, 22 Nov 2017 10:40:58 +0800 From: "Ni, Ruiyu" To: "Bi, Dandan" , "edk2-devel@lists.01.org" Thread-Topic: [patch] PcAtChipsetPkg/IsaAcpiDxe: Fix VS2012 build failure Thread-Index: AQHTYzYnDmY0c/nHYUipUVcc5f+kf6MfrxoA Date: Wed, 22 Nov 2017 02:40:58 +0000 Deferred-Delivery: Wed, 22 Nov 2017 02:37:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BACB16A@SHSMSX104.ccr.corp.intel.com> References: <1511316140-12868-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1511316140-12868-1-git-send-email-dandan.bi@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjFhOGQ2ZDgtZmRiNC00MzM1LWExOTEtYzE2MzE1YzJlNmNjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNy4yLjUuMTgiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaEFBbEZkdEJxMlRRODVPbldFY2ZSRCtmUHNxT1BUeEIzSjY4ZzJXdHlwN1VSbkxaWE5jcDFEeklQc0Z2TjN4ViJ9 x-ctpclassification: CTP_PUBLIC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] PcAtChipsetPkg/IsaAcpiDxe: Fix VS2012 build failure 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: Wed, 22 Nov 2017 02:36:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni > -----Original Message----- > From: Bi, Dandan > Sent: Wednesday, November 22, 2017 10:02 AM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu > Subject: [patch] PcAtChipsetPkg/IsaAcpiDxe: Fix VS2012 build failure >=20 > Done: > if (EFI_ERROR (Status)) { > if (PciIo !=3D NULL && Enabled) { > PciIo->Attributes ( > PciIo, > EfiPciIoAttributeOperationSet, > OriginalAttributes, > NULL > ); > } > } > In above codes, VS2012/VS2010 will report that "OriginalAttributes" > will be used without initialization. But in fact, when the if expression = is true(if > (PciIo !=3D NULL && Enabled)), the "OriginalAttributes" must be initializ= ed. In order > to fix this false positive issue, we initialize the "OriginalAttributes" = after > declaration. >=20 > Cc: Ruiyu Ni > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Dandan Bi > --- > PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c > b/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c > index d82e2c4..c7ea559 100644 > --- a/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c > +++ b/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c > @@ -176,10 +176,11 @@ PcatIsaAcpiDriverBindingStart ( > BOOLEAN Enabled; >=20 > Enabled =3D FALSE; > Supports =3D 0; > PcatIsaAcpiDev =3D NULL; > + OriginalAttributes =3D 0; > // > // Open the PCI I/O Protocol Interface > // > PciIo =3D NULL; > Status =3D gBS->OpenProtocol ( > -- > 1.9.5.msysgit.1