public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
@ 2017-12-28 19:59 Alex James
  2017-12-29  1:46 ` Gao, Liming
  0 siblings, 1 reply; 7+ messages in thread
From: Alex James @ 2017-12-28 19:59 UTC (permalink / raw)
  To: edk2-devel; +Cc: Alex James

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 <theracermaster@gmail.com>
---
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
  2017-12-28 19:59 [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string Alex James
@ 2017-12-29  1:46 ` Gao, Liming
  2017-12-29  2:58   ` Alex James
  0 siblings, 1 reply; 7+ messages in thread
From: Gao, Liming @ 2017-12-29  1:46 UTC (permalink / raw)
  To: Alex James, edk2-devel@lists.01.org

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 <theracermaster@gmail.com>
> 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 <theracermaster@gmail.com>
> ---
>  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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
  2017-12-29  1:46 ` Gao, Liming
@ 2017-12-29  2:58   ` Alex James
  2018-01-02  9:25     ` Ard Biesheuvel
  0 siblings, 1 reply; 7+ messages in thread
From: Alex James @ 2017-12-29  2:58 UTC (permalink / raw)
  To: Gao, Liming; +Cc: edk2-devel@lists.01.org

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 <liming.gao@intel.com> 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 <theracermaster@gmail.com>
> > 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 <theracermaster@gmail.com>
> > ---
> >  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
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
  2017-12-29  2:58   ` Alex James
@ 2018-01-02  9:25     ` Ard Biesheuvel
  2018-01-02  9:26       ` Ard Biesheuvel
  0 siblings, 1 reply; 7+ messages in thread
From: Ard Biesheuvel @ 2018-01-02  9:25 UTC (permalink / raw)
  To: Alex James; +Cc: Gao, Liming, edk2-devel@lists.01.org

On 29 December 2017 at 02:58, Alex James <theracermaster@gmail.com> 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 <liming.gao@intel.com> 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 <theracermaster@gmail.com>
>> > 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 <theracermaster@gmail.com>
>> > ---
>> >  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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
  2018-01-02  9:25     ` Ard Biesheuvel
@ 2018-01-02  9:26       ` Ard Biesheuvel
  2018-01-02 12:18         ` Gao, Liming
  0 siblings, 1 reply; 7+ messages in thread
From: Ard Biesheuvel @ 2018-01-02  9:26 UTC (permalink / raw)
  To: Alex James; +Cc: Gao, Liming, edk2-devel@lists.01.org

On 2 January 2018 at 09:25, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> On 29 December 2017 at 02:58, Alex James <theracermaster@gmail.com> 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?
>

Ehm, hold on. It is the other way around: on AARCH64, I now get

PcdValueCommon.c: In function ‘__PcdSet’:
PcdValueCommon.c:270:43: error: format ‘%lx’ expects argument of type
‘long unsigned int’, but argument 3 has type ‘UINT64 {aka long long
unsigned int}’ [-Werror=format=]
     sprintf(PcdList[Index].Value, "0x%016lx", Value);




>>
>> On Thu, Dec 28, 2017 at 7:46 PM Gao, Liming <liming.gao@intel.com> 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 <theracermaster@gmail.com>
>>> > 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 <theracermaster@gmail.com>
>>> > ---
>>> >  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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
  2018-01-02  9:26       ` Ard Biesheuvel
@ 2018-01-02 12:18         ` Gao, Liming
  2018-01-02 15:09           ` Ard Biesheuvel
  0 siblings, 1 reply; 7+ messages in thread
From: Gao, Liming @ 2018-01-02 12:18 UTC (permalink / raw)
  To: Ard Biesheuvel, Alex James; +Cc: edk2-devel@lists.01.org

Ard:
  The issue is related to UINT64 definition in the different ARCHs. In BaseTools X64 and IA32,  typedef uint64_t  UINT64. uint64_t doesn't work with %llx. To support all archs and tool chain, I propose to use below style to print X64 value.

    sprintf(PcdList[Index].Value, "0x%016llx", (unsigned long long) Value);

Thanks
Liming
> -----Original Message-----
> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> Sent: Tuesday, January 2, 2018 5:26 PM
> To: Alex James <theracermaster@gmail.com>
> Cc: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
> 
> On 2 January 2018 at 09:25, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > On 29 December 2017 at 02:58, Alex James <theracermaster@gmail.com> 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?
> >
> 
> Ehm, hold on. It is the other way around: on AARCH64, I now get
> 
> PcdValueCommon.c: In function ‘__PcdSet’:
> PcdValueCommon.c:270:43: error: format ‘%lx’ expects argument of type
> ‘long unsigned int’, but argument 3 has type ‘UINT64 {aka long long
> unsigned int}’ [-Werror=format=]
>      sprintf(PcdList[Index].Value, "0x%016lx", Value);
> 
> 
> 
> 
> >>
> >> On Thu, Dec 28, 2017 at 7:46 PM Gao, Liming <liming.gao@intel.com> 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 <theracermaster@gmail.com>
> >>> > 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 <theracermaster@gmail.com>
> >>> > ---
> >>> >  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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
  2018-01-02 12:18         ` Gao, Liming
@ 2018-01-02 15:09           ` Ard Biesheuvel
  0 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2018-01-02 15:09 UTC (permalink / raw)
  To: Gao, Liming; +Cc: Alex James, edk2-devel@lists.01.org

On 2 January 2018 at 12:18, Gao, Liming <liming.gao@intel.com> wrote:
> Ard:
>   The issue is related to UINT64 definition in the different ARCHs. In BaseTools X64 and IA32,  typedef uint64_t  UINT64. uint64_t doesn't work with %llx. To support all archs and tool chain, I propose to use below style to print X64 value.
>
>     sprintf(PcdList[Index].Value, "0x%016llx", (unsigned long long) Value);
>

Yes, that looks like the best way forward. Some projects address this
by adding arch-dependent #defines of the format specifier string, but
I think that is overkill here.

-- 
Ard.


>> -----Original Message-----
>> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
>> Sent: Tuesday, January 2, 2018 5:26 PM
>> To: Alex James <theracermaster@gmail.com>
>> Cc: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
>> Subject: Re: [edk2] [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string
>>
>> On 2 January 2018 at 09:25, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>> > On 29 December 2017 at 02:58, Alex James <theracermaster@gmail.com> 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?
>> >
>>
>> Ehm, hold on. It is the other way around: on AARCH64, I now get
>>
>> PcdValueCommon.c: In function ‘__PcdSet’:
>> PcdValueCommon.c:270:43: error: format ‘%lx’ expects argument of type
>> ‘long unsigned int’, but argument 3 has type ‘UINT64 {aka long long
>> unsigned int}’ [-Werror=format=]
>>      sprintf(PcdList[Index].Value, "0x%016lx", Value);
>>
>>
>>
>>
>> >>
>> >> On Thu, Dec 28, 2017 at 7:46 PM Gao, Liming <liming.gao@intel.com> 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 <theracermaster@gmail.com>
>> >>> > 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 <theracermaster@gmail.com>
>> >>> > ---
>> >>> >  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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-02 15:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-28 19:59 [PATCH] BaseTools/PcdValueCommon: Fix PcdDataTypeUint64 format string Alex James
2017-12-29  1:46 ` Gao, Liming
2017-12-29  2:58   ` Alex James
2018-01-02  9:25     ` Ard Biesheuvel
2018-01-02  9:26       ` Ard Biesheuvel
2018-01-02 12:18         ` Gao, Liming
2018-01-02 15:09           ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox