From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400c:c05::22f; helo=mail-vk0-x22f.google.com; envelope-from=alextjames1@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-vk0-x22f.google.com (mail-vk0-x22f.google.com [IPv6:2607:f8b0:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1D418208F79EE for ; Thu, 28 Dec 2017 18:53:58 -0800 (PST) Received: by mail-vk0-x22f.google.com with SMTP id n2so20271823vkf.4 for ; Thu, 28 Dec 2017 18:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hvzLmJbPcIdmQbw2Pp8sEYvie/MFmj7QeJEbyl1tduI=; b=DkFI6LkOvaI+cygMS+IdMomZE1ZsgUqwjng0PiMtzkpbRTyacE6YrS2y6kWwS0hx++ 4IoyBeQ8rRVuYPeFT3Ns7McvUtR/ww76VwCUMLT7qrvRlbR2/m1DmxZsNNVXcMfTSwqW lN2zFjkIJop+M01s+5guBU9EItuMLzKID2gk5ADeTJwyOMZ8Q1nTy8P6CCxFjwPiyuHP B4fxNA6ij01O7MjzUN6R2IgGJ96XppbjD+DobPtwp56S2/BnPQKUvcPLU6lrYV5VNBIa FlzrQgvMXZUvKatIf8QC3z7nTclZATBB3aNft2UP5ul7QcEemIynqP+KaBGdyhX75jbT L5Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hvzLmJbPcIdmQbw2Pp8sEYvie/MFmj7QeJEbyl1tduI=; b=AkwIL77QgUVLZZ8ekQ96j1PV5ji6CT1zDRdgyCBGJU/acjKe/2GpDLocIquoQPGO1z lAxNaRq7NNkTvZhBreAUTDwFLnlSjJ+Geu4TYNWifAu8QvMi8iUHN38CLejURs3lKg7w JOosRjYWAB+yQJiHazrsT7P/T/3Iprzb4Vg3ulBbMg5NMOqn9JhtMcWYkXqiNlHWo9dF nXV3VNgf0repruTnyKyIjB64Q0+UhcGzMl2IXn53Oa0jZ3q73qwNl+gjiYk1FEyar62C SZCX/fDpBuXd7ffFcLImfEz7bGA5lON5LEY7O1B5y8KfID2okNnSA89jriHXZHS2tghX Oq6A== X-Gm-Message-State: AKGB3mJD1SwywDh8Bv9qSl357ZwRO9mzH+EOsTRP3hf6Qs3taxJje4NY wIS2R+YYl1M+OZ3ImjOKEDhsIV7Avul6wyq+dHU= X-Google-Smtp-Source: ACJfBosGJxJeFKNmOLr47Ko/YapVqGVQPOjRcrnO9HaZdcxB37ZkWYpMQYkI08MddqinCGfVhMVWEbvPcMnDc71gr5U= X-Received: by 10.31.165.206 with SMTP id o197mr31982645vke.124.1514516334907; Thu, 28 Dec 2017 18:58:54 -0800 (PST) MIME-Version: 1.0 References: <7baf6db5ebfdef045c69aed44d86aada99a7f4ff.1514491125.git.theracermaster@gmail.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E19AED0@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E19AED0@SHSMSX104.ccr.corp.intel.com> From: Alex James Date: Fri, 29 Dec 2017 02:58:44 +0000 Message-ID: To: "Gao, Liming" Cc: "edk2-devel@lists.01.org" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 02:53:59 -0000 Content-Type: text/plain; charset="UTF-8" Hi Liming, I was able to reproduce this, will send out the v2 patch shortly. Thanks, Alex On Thu, Dec 28, 2017 at 7:46 PM Gao, Liming wrote: > This fix will trig GCC build warning. > > PcdValueCommon.c: In function '__PcdSet': > PcdValueCommon.c:269:35: error: format '%llx' expects argument of type > 'long long unsigned int', but argument 3 has type 'UINT64 {aka long > unsigned int}' [-Werror=format=] > sprintf(PcdList[Index].Value, "0x%016llx", Value); > ^ > > Thanks > Liming > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Alex 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 > format string > > > > Always specify unsigned long long for PcdDataTypeUint64. This is needed > > to fix building with XCODE5. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Alex James > > --- > > BaseTools/Source/C/Common/PcdValueCommon.c | 4 ---- > > 1 file changed, 4 deletions(-) > > > > diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c > b/BaseTools/Source/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 > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel >