Patchwork [2/2] fix unused compile warnings

login
register
mail settings
Submitter Cédric Le Goater
Date Feb. 7, 2014, 9:21 a.m.
Message ID <1391764884-3929-2-git-send-email-clg@fr.ibm.com>
Download mbox | patch
Permalink /patch/327258/
State New
Headers show

Comments

Cédric Le Goater - Feb. 7, 2014, 9:21 a.m.
This patch introduces a dependency on gcc. It should be fine.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
---
 second/fs_swap.c |    3 ++-
 second/yaboot.c  |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/second/fs_swap.c b/second/fs_swap.c
index 1efb96e1d812..39d0e6e1e1fc 100644
--- a/second/fs_swap.c
+++ b/second/fs_swap.c
@@ -88,7 +88,8 @@  swap_open(struct boot_file_t* file, struct partition_t* part,
 
      for(i=0; i< ARRAY_SIZE(signatures); i++) {
 	  int blk = part->part_start + (signatures[i].offset / part->blocksize);
-          int rc = prom_readblocks(file->of_device, blk, BLKCOUNT, buffer);
+	   int __attribute__((unused)) rc =
+	       prom_readblocks(file->of_device, blk, BLKCOUNT, buffer);
 
           /* FIXME: going past partition length */
           DEBUG_F("Looking for %s @ offset 0x%x, rc == %d, blk=0x%x\n",
diff --git a/second/yaboot.c b/second/yaboot.c
index ec0c0859d718..918f13168a6c 100644
--- a/second/yaboot.c
+++ b/second/yaboot.c
@@ -1509,7 +1509,8 @@  setup_display(void)
 	  0xff, 0xff, 0x55,
 	  0xff, 0xff, 0xff
      };
-     int i, result;
+     int i;
+     int __attribute__((unused)) result;
      prom_handle scrn = PROM_INVALID_HANDLE;
 
      /* Try Apple's mac-boot screen ihandle */