]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fixed the multiple pairs brackets issue in GenFv
authorChao Li <lichao@loongson.cn>
Thu, 20 Oct 2022 09:25:01 +0000 (17:25 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 22 Oct 2022 13:34:29 +0000 (13:34 +0000)
If operation Werro is turned on when compiling BaseTools, the
multi-brackets warning will be reported. This issue is comes from on of
the LoongArch enabled patche. Removed extra pairs brackets to fix it.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4111

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/C/GenFv/GenFvInternalLib.c

index 5c3d54f5f7a63edaeb8e498ba3dadc19797952d8..b5b94250033474ac12bda63ee724dc644191304e 100644 (file)
@@ -3559,7 +3559,7 @@ Returns:
       }\r
 \r
       // Machine type is LOONGARCH64, set a flag so LoongArch64 reset vector processed.\r
-      if ((MachineType == EFI_IMAGE_MACHINE_LOONGARCH64)) {\r
+      if (MachineType == EFI_IMAGE_MACHINE_LOONGARCH64) {\r
         VerboseMsg("Located LoongArch64 SEC core in child FV");\r
         mLoongArch = TRUE;\r
       }\r
@@ -3721,7 +3721,7 @@ Returns:
       mRiscV = TRUE;\r
     }\r
 \r
-    if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) ) {\r
+    if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {\r
       mLoongArch = TRUE;\r
     }\r
 \r
@@ -4002,7 +4002,7 @@ Returns:
       mArm = TRUE;\r
     }\r
 \r
-    if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) ) {\r
+    if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {\r
       mLoongArch = TRUE;\r
     }\r
 \r