diff mbox

[edk2,3/4] UefiCpuPkg/MtrrLib: remove unused but set variable

Message ID 1458800900-11913-4-git-send-email-ard.biesheuvel@linaro.org
State Superseded
Headers show

Commit Message

Ard Biesheuvel March 24, 2016, 6:28 a.m. UTC
Remove variable TempQWord that is declared, assigned but never referenced.
This fixes a warning emitted by GCC when -Wunused-but-set-variable is in
effect.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 2 --
 1 file changed, 2 deletions(-)

-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Laszlo Ersek March 24, 2016, 8:01 a.m. UTC | #1
On 03/24/16 07:28, Ard Biesheuvel wrote:
> Remove variable TempQWord that is declared, assigned but never referenced.

> This fixes a warning emitted by GCC when -Wunused-but-set-variable is in

> effect.

> 

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 2 --

>  1 file changed, 2 deletions(-)

> 

> diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c

> index 199e165d466a..5ed9f226e4d1 100644

> --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c

> +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c

> @@ -459,11 +459,9 @@ ProgramFixedMtrr (

>  {

>    UINT32  MsrNum;

>    UINT32  ByteShift;

> -  UINT64  TempQword;

>    UINT64  OrMask;

>    UINT64  ClearMask;

>  

> -  TempQword = 0;

>    OrMask    = 0;

>    ClearMask = 0;

>  

> 


Right, another of those 33.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
index 199e165d466a..5ed9f226e4d1 100644
--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
@@ -459,11 +459,9 @@  ProgramFixedMtrr (
 {
   UINT32  MsrNum;
   UINT32  ByteShift;
-  UINT64  TempQword;
   UINT64  OrMask;
   UINT64  ClearMask;
 
-  TempQword = 0;
   OrMask    = 0;
   ClearMask = 0;