From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.61.1608139364874719479 for ; Wed, 16 Dec 2020 09:22:44 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 979EF1FB; Wed, 16 Dec 2020 09:22:44 -0800 (PST) Received: from e120189.arm.com (unknown [10.57.25.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A15FC3F66E; Wed, 16 Dec 2020 09:22:43 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io, ard.biesheuvel@arm.com, leif@nuviainc.com Cc: sami.mujawar@arm.com Subject: [PATCH v1 16/25] ArmPkg: Fix Ecc error 5007 in TimerDxe Date: Wed, 16 Dec 2020 17:21:51 +0000 Message-Id: <20201216172200.25846-17-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216172200.25846-1-Pierre.Gondois@arm.com> References: <20201216172200.25846-1-Pierre.Gondois@arm.com> From: Pierre Gondois 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 --- The changes can be seen at: https://github.com/PierreARM/edk2/commits/1552_Ecc_ArmPkg_v1 ArmPkg/Drivers/TimerDxe/TimerDxe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/TimerDxe.c index 69f31e880a68..7a69f3882696 100644 --- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c +++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c @@ -359,7 +359,7 @@ TimerInitialize ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_HANDLE Handle = NULL; + EFI_HANDLE Handle; EFI_STATUS Status; UINTN TimerCtrlReg; UINT32 TimerHypIntrNum; @@ -408,6 +408,7 @@ TimerInitialize ( Status = TimerDriverSetTimerPeriod (&gTimer, FixedPcdGet32(PcdTimerPeriod)); // TIMER_DEFAULT_PERIOD ASSERT_EFI_ERROR (Status); + Handle = NULL; // Install the Timer Architectural Protocol onto a new handle Status = gBS->InstallMultipleProtocolInterfaces( &Handle, -- 2.17.1