From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 AB36C22198F6C for ; Thu, 28 Dec 2017 17:41:15 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Dec 2017 17:46:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,473,1508828400"; d="scan'208";a="5612020" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 28 Dec 2017 17:46:12 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 28 Dec 2017 17:46:12 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 28 Dec 2017 17:46:11 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Fri, 29 Dec 2017 09:46:09 +0800 From: "Gao, Liming" To: Alex James , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string Thread-Index: AQHTgBZzK2/kZv23kkK3szVoD59WkKNZjVZg Date: Fri, 29 Dec 2017 01:46:08 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E19AED0@SHSMSX104.ccr.corp.intel.com> References: <7baf6db5ebfdef045c69aed44d86aada99a7f4ff.1514491125.git.theracermaster@gmail.com> In-Reply-To: <7baf6db5ebfdef045c69aed44d86aada99a7f4ff.1514491125.git.theracermaster@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string 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: Fri, 29 Dec 2017 01:41:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This fix will trig GCC build warning.=20 PcdValueCommon.c: In function '__PcdSet': PcdValueCommon.c:269:35: error: format '%llx' expects argument of type 'lon= g long unsigned int', but argument 3 has type 'UINT64 {aka long unsigned in= t}' [-Werror=3Dformat=3D] sprintf(PcdList[Index].Value, "0x%016llx", Value); ^ Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Al= ex James > Sent: Friday, December 29, 2017 4:00 AM > To: edk2-devel@lists.01.org > Cc: Alex James > Subject: [edk2] [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 f= ormat string >=20 > Always specify unsigned long long for PcdDataTypeUint64. This is needed > to fix building with XCODE5. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Alex James > --- > BaseTools/Source/C/Common/PcdValueCommon.c | 4 ---- > 1 file changed, 4 deletions(-) >=20 > diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c b/BaseTools/Sourc= e/C/Common/PcdValueCommon.c > index 6ca0994744..f5d68e79e0 100644 > --- a/BaseTools/Source/C/Common/PcdValueCommon.c > +++ b/BaseTools/Source/C/Common/PcdValueCommon.c > @@ -266,11 +266,7 @@ Returns: > sprintf(PcdList[Index].Value, "0x%08x", (UINT32)(Value & 0xffffffff)= ); > break; > case PcdDataTypeUint64: > -#ifdef __GNUC__ > - sprintf(PcdList[Index].Value, "0x%016lx", Value); > -#else > sprintf(PcdList[Index].Value, "0x%016llx", Value); > -#endif > break; > case PcdDataTypePointer: > fprintf (stderr, "PCD %s.%s.%s.%s is structure. Use PcdSetPtr()\n",= SkuName, DefaultValueName, TokenSpaceGuidName, > TokenName); > -- > 2.15.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel