[edk2-devel] [PATCH v1 19/25] ArmPkg: Fix Ecc error 5007 in ArmDisassemblerLib
PierreGondois
pierre.gondois at arm.com
Wed Dec 16 17:21:54 UTC 2020
From: Pierre Gondois <Pierre.Gondois at arm.com>
This patch fixes the following Ecc reported error:
There should be no initialization of a variable as
part of its declaration
Signed-off-by: Pierre Gondois <Pierre.Gondois at arm.com>
---
The changes can be seen at: https://github.com/PierreARM/edk2/commits/1552_Ecc_ArmPkg_v1
ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c b/ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c
index 04b6c2cd21e0..1882163522d9 100644
--- a/ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c
+++ b/ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c
@@ -158,7 +158,7 @@ DisassembleArmInstruction (
IN BOOLEAN Extended
)
{
- UINT32 OpCode = **OpCodePtr;
+ UINT32 OpCode;
CHAR8 *Type, *Root;
BOOLEAN I, P, U, B, W, L, S, H;
UINT32 Rn, Rd, Rm;
@@ -166,6 +166,8 @@ DisassembleArmInstruction (
UINT32 Index;
UINT32 shift_imm, shift;
+ OpCode = = **OpCodePtr;
+
I = (OpCode & BIT25) == BIT25;
P = (OpCode & BIT24) == BIT24;
U = (OpCode & BIT23) == BIT23;
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69002): https://edk2.groups.io/g/devel/message/69002
Mute This Topic: https://groups.io/mt/79006209/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list