From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::243; helo=mail-io0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (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 9AD71222EDCC4 for ; Tue, 2 Jan 2018 01:20:24 -0800 (PST) Received: by mail-io0-x243.google.com with SMTP id w188so3937155iod.10 for ; Tue, 02 Jan 2018 01:25:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AbDhEiiunrNsw7cTobbDz+HonYEBwTEEKdFl8N/6BU4=; b=hgEcC+xaf1hylZbU6Yx8gPl5jxSi0+eRnRfgLbCLZ8oyocSRglT/ENuFEdHc2coan1 oLGZ4IkbuNl9JZLlb06C9JZZzZE9elR3tnAe/AswKi8FW0VE1vymLcjWoZfn8XeyOgnA 8kEeDwmV0gUu3R0hovh8kODNO1q0sY31sXao0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AbDhEiiunrNsw7cTobbDz+HonYEBwTEEKdFl8N/6BU4=; b=i4Z1cz1ijj0aD8hkyl4i4tJiXqSlEiq3nlTaw7Kt1CMCZdsoa/7komI+sZ4Swqw3qb BT0Z79tf2oQDiQRDO0uTOb/mjDJI6b/5JXDYGej4EZZ2L+hmPbCesELAKCm8OWikisTV btx+At1BU3FksbFrNJnAnBUhfpy27J5eDhBdgrrr+nBth0+Hw0qXkx52rNyx8VQUsCI0 qR769UTr4GjyI1y08PXmh1/f+Symipb2f1icMxR7Kblq3cZIjTXBZj3wUI4QZQSEAbuf mOLB0cvE7SQi4KeFlMs+UoAzkmtvmnY3lC85+oE6nLYWyJ4mCsUL+GpQ0jTB69cH5tgH SVrA== X-Gm-Message-State: AKGB3mIQjA/4iOQBtuSHaNitmsgrrGXaAYLmWbyjvgWhoxkqH0gxr1TN QOibobfGb+cn8dxnhl80KJV2IGaGh4cho1bLyBNQJmGu X-Google-Smtp-Source: ACJfBovVsDTFSC0Mgwo78/TGHustGuHdi42sDih5px7VgG/DKV1wa9n3JRCaVVvIm77AR46uYGqOKfsTFsYmNV0JcFQ= X-Received: by 10.107.133.34 with SMTP id h34mr57722655iod.253.1514885126208; Tue, 02 Jan 2018 01:25:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.37.197 with HTTP; Tue, 2 Jan 2018 01:25:25 -0800 (PST) In-Reply-To: References: <7baf6db5ebfdef045c69aed44d86aada99a7f4ff.1514491125.git.theracermaster@gmail.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E19AED0@SHSMSX104.ccr.corp.intel.com> From: Ard Biesheuvel Date: Tue, 2 Jan 2018 09:25:25 +0000 Message-ID: To: Alex James Cc: "Gao, Liming" , "edk2-devel@lists.01.org" 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: Tue, 02 Jan 2018 09:20:25 -0000 Content-Type: text/plain; charset="UTF-8" On 29 December 2017 at 02:58, Alex James wrote: > Hi Liming, > > I was able to reproduce this, will send out the v2 patch shortly. > This is still broken in today's tree. Could we get a fix please? > > 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 >> > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel