From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 51A5021A6F108 for ; Tue, 4 Apr 2017 18:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491354763; x=1522890763; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=1xyL4sf7ft6eQI2ccyRYOtNZO86fkbxVzcSel19ngdA=; b=bGsDa1FRkiCVFuxl2Q91wO/UvXhpXETeLf74gXqu4w3FjPVcrmX+WDp0 yGJgDvQwH4ho8sLq4yBB0T9DWqqF8Q==; Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2017 18:12:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,276,1486454400"; d="scan'208";a="841975277" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 04 Apr 2017 18:12:42 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 4 Apr 2017 18:12:41 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 4 Apr 2017 18:12:41 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.178]) by shsmsx102.ccr.corp.intel.com ([169.254.2.246]) with mapi id 14.03.0319.002; Wed, 5 Apr 2017 09:12:37 +0800 From: "Ni, Ruiyu" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Fan, Jeff" Thread-Topic: [patch] UefiCpuPkg/MtrrLib:Fix VS2012 build failure Thread-Index: AQHSrakEjXUoi/r6606Qv2nRpcQ70qG19/uQ Date: Wed, 5 Apr 2017 01:12:37 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B913E21@SHSMSX104.ccr.corp.intel.com> References: <1491354393-115588-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1491354393-115588-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTZhMGU5YjMtYWQ1OS00YTg1LWIwZDEtMmY3MmI2YzQxZTRiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkdRMTRDRWVkUDkyT0pQUWdQcllNRDBYQndPTXZOVkVTUXc0RUZmUjRLRE09In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] UefiCpuPkg/MtrrLib: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, 05 Apr 2017 01:12:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dandan, Thank you! I thought I fixed all the build failures. Reviewed-by: Ruiyu Ni Regards, Ray >-----Original Message----- >From: Bi, Dandan >Sent: Wednesday, April 5, 2017 9:07 AM >To: edk2-devel@lists.01.org >Cc: Ni, Ruiyu ; Fan, Jeff >Subject: [patch] UefiCpuPkg/MtrrLib:Fix VS2012 build failure > >Cc: Ruiyu Ni >Cc: Jeff Fan >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Dandan Bi >--- > UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/Mtr= rLib/MtrrLib.c >index 8e84272..c38191a 100644 >--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c >+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c >@@ -700,10 +700,11 @@ MtrrLibGetPositiveMtrrNumber ( > UINT64 SubLength; > UINT32 MtrrNumber; > BOOLEAN UseLeastAlignment; > > UseLeastAlignment =3D TRUE; >+ SubLength =3D 0; > > // > // Calculate the alignment of the base address. > // > for (MtrrNumber =3D 0; Length !=3D 0; MtrrNumber++) { >@@ -852,10 +853,11 @@ MtrrLibGetMtrrNumber ( > UINT32 Index; > > *SubLeft =3D 0; > *SubRight =3D 0; > LeastSubtractiveMtrrNumber =3D 0; >+ BaseAlignment =3D 0; > > // > // Get the optimal left subtraction solution. > // > if (BaseAddress !=3D 0) { >@@ -1625,10 +1627,12 @@ MtrrLibSetMemoryAttributeInVariableMtrr ( > UINT32 MtrrNumber; > UINT32 SubtractiveLeft; > UINT32 SubtractiveRight; > BOOLEAN UseLeastAlignment; > >+ Alignment =3D 0; >+ > MtrrNumber =3D MtrrLibGetMtrrNumber (Ranges, RangeCount, VariableMtrr, = *VariableMtrrCount, > BaseAddress, Length, Type, Alignment= 0, &SubtractiveLeft, &SubtractiveRight); > > if (MtrrNumber + *VariableMtrrCount > VariableMtrrCapacity) { > return RETURN_OUT_OF_RESOURCES; >-- >1.9.5.msysgit.1