From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 3407E21AF39D6 for ; Wed, 24 May 2017 06:25:16 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 24 May 2017 06:25:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,386,1491289200"; d="scan'208";a="91013902" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 24 May 2017 06:25:15 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 May 2017 06:25:15 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 May 2017 06:25:14 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Wed, 24 May 2017 21:25:13 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Correct if condition expression for DatumType == 'VOID*' Thread-Index: AQHS1HG9gL63EymGyUiYRfaIKjYin6IDeVKQ Date: Wed, 24 May 2017 13:25:12 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D733C07@shsmsx102.ccr.corp.intel.com> References: <1495618764-5272-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1495618764-5272-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Correct if condition expression for DatumType == 'VOID*' 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, 24 May 2017 13:25:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yo= nghong Zhu > Sent: Wednesday, May 24, 2017 5:39 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [edk2] [Patch] BaseTools: Correct if condition expression for Da= tumType =3D=3D 'VOID*' >=20 > Correct the if condition expression for DatumType =3D=3D 'VOID*'. Current > this condition is not work since the DatumType is changed before we do > the value judgement. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/AutoGen/GenC.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/P= ython/AutoGen/GenC.py > index ae191d8..67aaef7 100644 > --- a/BaseTools/Source/Python/AutoGen/GenC.py > +++ b/BaseTools/Source/Python/AutoGen/GenC.py > @@ -1224,11 +1224,11 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH= , Pcd): > AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' %(D= atumType, TokenCName, Array)) > AutoGenH.Append('#define %s %s_gPcd_FixedAtBuild_%s\n' %(GetMod= eName, Type, TokenCName)) > AutoGenH.Append('//#define %s ASSERT(FALSE) // It is not allow= ed to set value for a FIXED_AT_BUILD PCD\n' % > SetModeName) >=20 > if PcdItemType =3D=3D TAB_PCDS_FIXED_AT_BUILD and (key in Info.C= onstPcd or (Info.IsLibrary and not > Info._ReferenceModules)): > - if DatumType =3D=3D 'VOID*': > + if Pcd.DatumType =3D=3D 'VOID*': > AutoGenH.Append('#define _PCD_VALUE_%s %s%s\n' %(TokenCN= ame, Type, PcdVariableName)) > else: > AutoGenH.Append('#define _PCD_VALUE_%s %s\n' %(TokenCNam= e, Pcd.DefaultValue)) >=20 > if PcdItemType =3D=3D TAB_PCDS_FIXED_AT_BUILD: > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel