public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools GenFw: Fix XCODE5 build issue
@ 2019-01-14 13:52 Liming Gao
  2019-01-14 14:35 ` Laszlo Ersek
  2019-01-15  5:07 ` Feng, Bob C
  0 siblings, 2 replies; 4+ messages in thread
From: Liming Gao @ 2019-01-14 13:52 UTC (permalink / raw)
  To: edk2-devel

Remove extraneous parentheses around the comparison to silence this warning.
This issue is caused by commit 8daa4278e80c70e6caabc525cd122744488253f5.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Feng Bob C <bob.c.feng@intel.com>
---
 BaseTools/Source/C/GenFw/GenFw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index 37278bbc68..af2c909866 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -1014,7 +1014,7 @@ Returns:
   //
   // Update Image Base Address
   //
-  if ((ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) {
+  if (ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
     ImgHdr->Pe32.OptionalHeader.ImageBase = (UINT32) NewPe32BaseAddress;
   } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) {
     ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress;
@@ -2180,7 +2180,7 @@ Returns:
   // Set new base address into image
   //
   if (mOutImageType == FW_REBASE_IMAGE || mOutImageType == FW_SET_ADDRESS_IMAGE) {
-    if ((PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) {
+    if (PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
       if (NewBaseAddress >= 0x100000000ULL) {
         Error (NULL, 0, 3000, "Invalid", "New base address is larger than 4G for 32bit PE image");
         goto Finish;
-- 
2.13.0.windows.1



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

* Re: [Patch] BaseTools GenFw: Fix XCODE5 build issue
  2019-01-14 13:52 [Patch] BaseTools GenFw: Fix XCODE5 build issue Liming Gao
@ 2019-01-14 14:35 ` Laszlo Ersek
  2019-01-14 15:38   ` Gao, Liming
  2019-01-15  5:07 ` Feng, Bob C
  1 sibling, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2019-01-14 14:35 UTC (permalink / raw)
  To: Liming Gao, edk2-devel

On 01/14/19 14:52, Liming Gao wrote:
> Remove extraneous parentheses around the comparison to silence this warning.

Can you please quote the warning message in the commit message? It's
unclear what warning the commit message refers to. (No need to repost
just for this.)

Thanks
Laszlo

> This issue is caused by commit 8daa4278e80c70e6caabc525cd122744488253f5.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> Cc: Feng Bob C <bob.c.feng@intel.com>
> ---
>  BaseTools/Source/C/GenFw/GenFw.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
> index 37278bbc68..af2c909866 100644
> --- a/BaseTools/Source/C/GenFw/GenFw.c
> +++ b/BaseTools/Source/C/GenFw/GenFw.c
> @@ -1014,7 +1014,7 @@ Returns:
>    //
>    // Update Image Base Address
>    //
> -  if ((ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) {
> +  if (ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
>      ImgHdr->Pe32.OptionalHeader.ImageBase = (UINT32) NewPe32BaseAddress;
>    } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) {
>      ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress;
> @@ -2180,7 +2180,7 @@ Returns:
>    // Set new base address into image
>    //
>    if (mOutImageType == FW_REBASE_IMAGE || mOutImageType == FW_SET_ADDRESS_IMAGE) {
> -    if ((PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) {
> +    if (PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
>        if (NewBaseAddress >= 0x100000000ULL) {
>          Error (NULL, 0, 3000, "Invalid", "New base address is larger than 4G for 32bit PE image");
>          goto Finish;
> 



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

* Re: [Patch] BaseTools GenFw: Fix XCODE5 build issue
  2019-01-14 14:35 ` Laszlo Ersek
@ 2019-01-14 15:38   ` Gao, Liming
  0 siblings, 0 replies; 4+ messages in thread
From: Gao, Liming @ 2019-01-14 15:38 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel@lists.01.org

Got it. I will update the commit message with the warning message "equality comparison with extraneous parentheses".

Thanks
Liming
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Monday, January 14, 2019 10:36 PM
> To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> Subject: Re: [edk2] [Patch] BaseTools GenFw: Fix XCODE5 build issue
> 
> On 01/14/19 14:52, Liming Gao wrote:
> > Remove extraneous parentheses around the comparison to silence this warning.
> 
> Can you please quote the warning message in the commit message? It's
> unclear what warning the commit message refers to. (No need to repost
> just for this.)
> 
> Thanks
> Laszlo
> 
> > This issue is caused by commit 8daa4278e80c70e6caabc525cd122744488253f5.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Liming Gao <liming.gao@intel.com>
> > Cc: Feng Bob C <bob.c.feng@intel.com>
> > ---
> >  BaseTools/Source/C/GenFw/GenFw.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
> > index 37278bbc68..af2c909866 100644
> > --- a/BaseTools/Source/C/GenFw/GenFw.c
> > +++ b/BaseTools/Source/C/GenFw/GenFw.c
> > @@ -1014,7 +1014,7 @@ Returns:
> >    //
> >    // Update Image Base Address
> >    //
> > -  if ((ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) {
> > +  if (ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
> >      ImgHdr->Pe32.OptionalHeader.ImageBase = (UINT32) NewPe32BaseAddress;
> >    } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) {
> >      ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress;
> > @@ -2180,7 +2180,7 @@ Returns:
> >    // Set new base address into image
> >    //
> >    if (mOutImageType == FW_REBASE_IMAGE || mOutImageType == FW_SET_ADDRESS_IMAGE) {
> > -    if ((PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) {
> > +    if (PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
> >        if (NewBaseAddress >= 0x100000000ULL) {
> >          Error (NULL, 0, 3000, "Invalid", "New base address is larger than 4G for 32bit PE image");
> >          goto Finish;
> >


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

* Re: [Patch] BaseTools GenFw: Fix XCODE5 build issue
  2019-01-14 13:52 [Patch] BaseTools GenFw: Fix XCODE5 build issue Liming Gao
  2019-01-14 14:35 ` Laszlo Ersek
@ 2019-01-15  5:07 ` Feng, Bob C
  1 sibling, 0 replies; 4+ messages in thread
From: Feng, Bob C @ 2019-01-15  5:07 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org

Reviewed-by: Feng Bob C <bob.c.feng@intel.com>

-----Original Message-----
From: Gao, Liming 
Sent: Monday, January 14, 2019 9:52 PM
To: edk2-devel@lists.01.org
Cc: Feng, Bob C <bob.c.feng@intel.com>
Subject: [Patch] BaseTools GenFw: Fix XCODE5 build issue

Remove extraneous parentheses around the comparison to silence this warning.
This issue is caused by commit 8daa4278e80c70e6caabc525cd122744488253f5.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Feng Bob C <bob.c.feng@intel.com>
---
 BaseTools/Source/C/GenFw/GenFw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index 37278bbc68..af2c909866 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -1014,7 +1014,7 @@ Returns:
   //
   // Update Image Base Address
   //
-  if ((ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) {
+  if (ImgHdr->Pe32.OptionalHeader.Magic == 
+ EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
     ImgHdr->Pe32.OptionalHeader.ImageBase = (UINT32) NewPe32BaseAddress;
   } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) {
     ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress; @@ -2180,7 +2180,7 @@ Returns:
   // Set new base address into image
   //
   if (mOutImageType == FW_REBASE_IMAGE || mOutImageType == FW_SET_ADDRESS_IMAGE) {
-    if ((PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) {
+    if (PeHdr->Pe32.OptionalHeader.Magic == 
+ EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
       if (NewBaseAddress >= 0x100000000ULL) {
         Error (NULL, 0, 3000, "Invalid", "New base address is larger than 4G for 32bit PE image");
         goto Finish;
--
2.13.0.windows.1



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

end of thread, other threads:[~2019-01-15  5:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-14 13:52 [Patch] BaseTools GenFw: Fix XCODE5 build issue Liming Gao
2019-01-14 14:35 ` Laszlo Ersek
2019-01-14 15:38   ` Gao, Liming
2019-01-15  5:07 ` Feng, Bob C

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