Re: [edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning

2019-11-21 Thread Leif Lindholm
On Thu, Nov 21, 2019 at 14:09:41 +0100, Ard Biesheuvel wrote: > > > I don't like this at all. > > > > > > If two expressions happen to evaluate to the same constant, we should > > > be able to compare them using C code. > > > > > > I think we should disable the warning instead. > > > > I agree

Re: [edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning

2019-11-21 Thread Ard Biesheuvel
On Thu, 21 Nov 2019 at 16:15, Leif Lindholm wrote: > > On Thu, Nov 21, 2019 at 14:09:41 +0100, Ard Biesheuvel wrote: > > > > I don't like this at all. > > > > > > > > If two expressions happen to evaluate to the same constant, we should > > > > be able to compare them using C code. > > > > > > >

Re: [edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning

2019-11-21 Thread Ard Biesheuvel
On Thu, 21 Nov 2019 at 13:53, Leif Lindholm wrote: > > On Thu, Nov 21, 2019 at 13:39:55 +0100, Ard Biesheuvel wrote: > > On Thu, 21 Nov 2019 at 13:35, Leif Lindholm > > wrote: > > > > > > On Fri, Aug 23, 2019 at 11:55:38 +0100, Sami Mujawar wrote: > > > > The VS2017 compiler reports 'warning

Re: [edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning

2019-11-21 Thread Leif Lindholm
On Thu, Nov 21, 2019 at 13:39:55 +0100, Ard Biesheuvel wrote: > On Thu, 21 Nov 2019 at 13:35, Leif Lindholm wrote: > > > > On Fri, Aug 23, 2019 at 11:55:38 +0100, Sami Mujawar wrote: > > > The VS2017 compiler reports 'warning C6326: potential > > > comparison of a constant with another constant'

Re: [edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning

2019-11-21 Thread Ard Biesheuvel
On Thu, 21 Nov 2019 at 13:35, Leif Lindholm wrote: > > On Fri, Aug 23, 2019 at 11:55:38 +0100, Sami Mujawar wrote: > > The VS2017 compiler reports 'warning C6326: potential > > comparison of a constant with another constant' when > > a fixed PCD value is compared with a constant value. > > > >

Re: [edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning

2019-11-21 Thread Leif Lindholm
On Fri, Aug 23, 2019 at 11:55:38 +0100, Sami Mujawar wrote: > The VS2017 compiler reports 'warning C6326: potential > comparison of a constant with another constant' when > a fixed PCD value is compared with a constant value. > > The faulting code is as marked by '-->' below: > > --> if

Re: [edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning

2019-08-23 Thread Alexei Fedorov
Reviewed-by: Alexei Fedorov Alexei From: Sami Mujawar Sent: 23 August 2019 11:55 To: devel@edk2.groups.io Cc: Sami Mujawar ; Alexei Fedorov ; ard.biesheu...@linaro.org ; leif.lindh...@linaro.org ; Matteo Carlini ; nd Subject: [PATCH v1 18/19]

[edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning

2019-08-23 Thread Sami Mujawar
The VS2017 compiler reports 'warning C6326: potential comparison of a constant with another constant' when a fixed PCD value is compared with a constant value. The faulting code is as marked by '-->' below: --> if (FixedPcdGet32 (PL011UartInteger) != 0) { Integer = FixedPcdGet32