Browse Source

This makes "-Werror=unused-but-set-variable" work.

Signed-off-by: Peter Jones <[email protected]>
Signed-off-by: Nigel Croxon <[email protected]>
Nigel Croxon 9 years ago
parent
commit
1ecae7d44c
2 changed files with 5 additions and 6 deletions
  1. 1 2
      lib/hand.c
  2. 4 4
      lib/hw.c

+ 1 - 2
lib/hand.c

@@ -117,7 +117,7 @@ LibLocateHandleByDiskSignature (
     EFI_HANDLE            *BlockIoBuffer;
     EFI_DEVICE_PATH       *DevicePath;
     UINTN                 Index;
-    EFI_DEVICE_PATH       *Start, *Next, *DevPath;
+    EFI_DEVICE_PATH       *Next, *DevPath;
     HARDDRIVE_DEVICE_PATH *HardDriveDevicePath;
     BOOLEAN               Match;
     BOOLEAN               PreviousNodeIsHardDriveDevicePath;
@@ -200,7 +200,6 @@ LibLocateHandleByDiskSignature (
             PreviousNodeIsHardDriveDevicePath = FALSE;
 
             DevPath = DevicePath;
-            Start = DevPath;
 
             //
             // Check for end of device path type

+ 4 - 4
lib/hw.c

@@ -76,7 +76,7 @@ ReadPort (
         )
 {
     UINT32       Data;
-    EFI_STATUS  Status;
+    EFI_STATUS  Status __attribute__((__unused__));
 
     Status = uefi_call_wrapper(GlobalIoFncs->Io.Read, 5, GlobalIoFncs, Width, (UINT64)Port, 1, &Data);
     ASSERT(!EFI_ERROR(Status));
@@ -91,7 +91,7 @@ WritePort (
         IN  UINTN                       Data
         )
 {
-    EFI_STATUS  Status;
+    EFI_STATUS  Status __attribute__((__unused__));
 
     Status = uefi_call_wrapper(GlobalIoFncs->Io.Write, 5, GlobalIoFncs, Width, (UINT64)Port, 1, &Data);
     ASSERT(!EFI_ERROR(Status));
@@ -106,7 +106,7 @@ ReadPciConfig (
         )
 {
     UINT32       Data;
-    EFI_STATUS  Status;
+    EFI_STATUS  Status __attribute__((__unused__));
 
     Status = uefi_call_wrapper(GlobalIoFncs->Pci.Read, 5, GlobalIoFncs, Width, (UINT64)Address, 1, &Data);
     ASSERT(!EFI_ERROR(Status));
@@ -121,7 +121,7 @@ WritePciConfig (
         IN  UINTN                       Data
         )
 {
-    EFI_STATUS  Status;
+    EFI_STATUS  Status __attribute__((__unused__));
 
     Status = uefi_call_wrapper(GlobalIoFncs->Pci.Write, 5, GlobalIoFncs, Width, (UINT64)Address, 1, &Data);
     ASSERT(!EFI_ERROR(Status));