[edk2-devel] [PATCH] BaseTools/PeCoffLoaderEx: Remove the unused local variable

Abner Chang posted 1 patch 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/edk2 tags/patchew/20200725023451.3850-1-abner.chang@hpe.com
BaseTools/Source/C/Common/PeCoffLoaderEx.c | 3 ---
1 file changed, 3 deletions(-)

[edk2-devel] [PATCH] BaseTools/PeCoffLoaderEx: Remove the unused local variable

Posted by Abner Chang 3 weeks ago
BZ:2864 GCC build fails due to variable self assignment.

This local variable is not used at any where, we can just remove it.

Signed-off-by: Abner Chang <abner.chang@hpe.com>

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
---
 BaseTools/Source/C/Common/PeCoffLoaderEx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/BaseTools/Source/C/Common/PeCoffLoaderEx.c b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
index 588b3a2f84..799f282970 100644
--- a/BaseTools/Source/C/Common/PeCoffLoaderEx.c
+++ b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
@@ -127,10 +127,7 @@ PeCoffLoaderRelocateRiscVImage (
 {
   UINT32 Value;
   UINT32 Value2;
-  UINT32 OrgValue;
 
-  OrgValue = *(UINT32 *) Fixup;
-  OrgValue = OrgValue;
   switch ((*Reloc) >> 12) {
   case EFI_IMAGE_REL_BASED_RISCV_HI20:
       RiscVHi20Fixup = (UINT32 *) Fixup;
-- 
2.25.0


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63269): https://edk2.groups.io/g/devel/message/63269
Mute This Topic: https://groups.io/mt/75779823/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] BaseTools/PeCoffLoaderEx: Remove the unused local variable

Posted by Liming Gao 2 weeks ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner Chang
Sent: 2020年7月25日 10:35
To: devel@edk2.groups.io
Cc: abner.chang@hpe.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Daniel Schaefer <daniel.schaefer@hpe.com>
Subject: [edk2-devel] [PATCH] BaseTools/PeCoffLoaderEx: Remove the unused local variable

BZ:2864 GCC build fails due to variable self assignment.

This local variable is not used at any where, we can just remove it.

Signed-off-by: Abner Chang <abner.chang@hpe.com>

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
---
 BaseTools/Source/C/Common/PeCoffLoaderEx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/BaseTools/Source/C/Common/PeCoffLoaderEx.c b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
index 588b3a2f84..799f282970 100644
--- a/BaseTools/Source/C/Common/PeCoffLoaderEx.c
+++ b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
@@ -127,10 +127,7 @@ PeCoffLoaderRelocateRiscVImage (
 {   UINT32 Value;   UINT32 Value2;-  UINT32 OrgValue; -  OrgValue = *(UINT32 *) Fixup;-  OrgValue = OrgValue;   switch ((*Reloc) >> 12) {   case EFI_IMAGE_REL_BASED_RISCV_HI20:       RiscVHi20Fixup = (UINT32 *) Fixup;-- 
2.25.0


-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63269): https://edk2.groups.io/g/devel/message/63269
Mute This Topic: https://groups.io/mt/75779823/1759384
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [liming.gao@intel.com] -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63428): https://edk2.groups.io/g/devel/message/63428
Mute This Topic: https://groups.io/mt/75779823/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-