]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Remove variables that are set, but not used
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Oct 2011 15:57:12 +0000 (15:57 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Oct 2011 15:57:12 +0000 (15:57 +0000)
GCC 4.6 generates a warning when a variable is set,
but never used.

Signed-off-by: jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12615 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c
OvmfPkg/PlatformPei/Fv.c
OvmfPkg/Sec/SecMain.c

index a2276bfb2f9f79ab5b2b24514ac1ae3ced16b5af..112f20e052f1772b90bd6d383c094881082e8c38 100644 (file)
@@ -137,7 +137,6 @@ IterateVariablesInBuffer (
   )
 {
   RETURN_STATUS Status;
-  UINTN         Count;
   UINTN         TotalSizeUsed;
   UINTN         SizeUsed;
 
@@ -160,7 +159,7 @@ IterateVariablesInBuffer (
   Data = NULL;
 
   for (
-    Status = EFI_SUCCESS, Count = 0, TotalSizeUsed = 0;
+    Status = EFI_SUCCESS, TotalSizeUsed = 0;
     !EFI_ERROR (Status) && (TotalSizeUsed < MaxSize);
     ) {
     Status = UnpackVariableFromBuffer (
index c812b3a9ac4077d856b096d64ea9ee946f92f974..f389e277c958a937f9218bf65100452e737635b2 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Build FV related hobs for platform.\r
 \r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -33,8 +33,6 @@ PeiFvInitialization (
   VOID\r
   )\r
 {\r
-  EFI_PHYSICAL_ADDRESS        FdBase;\r
-\r
   DEBUG ((EFI_D_ERROR, "Platform PEI Firmware Volume Initialization\n"));\r
 \r
   DEBUG (\r
@@ -44,7 +42,6 @@ PeiFvInitialization (
       )\r
     );\r
 \r
-  FdBase = PcdGet32 (PcdOvmfMemFvBase) - PcdGet32 (PcdVariableStoreSize) - PcdGet32 (PcdFlashNvStorageFtwSpareSize);\r
   BuildFvHob (PcdGet32 (PcdOvmfMemFvBase), PcdGet32 (PcdOvmfMemFvSize));\r
 \r
   //\r
index c13abe0aec637a822b83f6f799056df9a4b1cfb3..3882dadd637f0e6030f26b1b99554f865a245a06 100644 (file)
@@ -98,11 +98,9 @@ FindMainFv (
 {
   EFI_FIRMWARE_VOLUME_HEADER  *Fv;
   UINTN                       Distance;
-  BOOLEAN                     Found;
 
   ASSERT (((UINTN) *BootFv & EFI_PAGE_MASK) == 0);
 
-  Found = FALSE;
   Fv = *BootFv;
   Distance = (UINTN) (*BootFv)->FvLength;
   do {