[OpenBIOS] [commit] r884 - in trunk/openbios-devel/fs: hfs iso9660

repository service svn at openbios.org
Sun Oct 3 21:18:27 CEST 2010


Author: blueswirl
Date: Sun Oct  3 21:18:26 2010
New Revision: 884
URL: http://tracker.coreboot.org/trac/openbios/changeset/884

Log:
ppc: fix warnings from GCC 4.6.0

Compiling PPC with GCC 4.6.0 20100925 produced a few warnings:
../fs/hfs/block.c: In function 'reuse':
../fs/hfs/block.c:304:11: error: variable 'chain' set but not used [-Werror=unused-but-set-variable]
../fs/iso9660/iso9660_mount.c: In function 'iso9660_name':
../fs/iso9660/iso9660_mount.c:18:16: error: variable 'uh' set but not used [-Werror=unused-but-set-variable]

Fix the warnings by avoiding write-only variables.

Signed-off-by: Blue Swirl <blauwirbel at gmail.com>

Modified:
   trunk/openbios-devel/fs/hfs/block.c
   trunk/openbios-devel/fs/iso9660/iso9660_mount.c

Modified: trunk/openbios-devel/fs/hfs/block.c
==============================================================================
--- trunk/openbios-devel/fs/hfs/block.c	Sun Oct  3 21:18:23 2010	(r883)
+++ trunk/openbios-devel/fs/hfs/block.c	Sun Oct  3 21:18:26 2010	(r884)
@@ -301,7 +301,7 @@
 static
 int reuse(bcache *cache, bucket *b, unsigned long bnum)
 {
-  bucket *chain[HFS_BLOCKBUFSZ], *bptr;
+  bucket *bptr;
   int i;
 
 # ifdef DEBUG
@@ -317,7 +317,6 @@
 
       for (bptr = b, i = 0; i < HFS_BLOCKBUFSZ; ++i)
 	{
-	  chain[i] = bptr;
 	  bptr = bptr->cprev;
 	}
     }

Modified: trunk/openbios-devel/fs/iso9660/iso9660_mount.c
==============================================================================
--- trunk/openbios-devel/fs/iso9660/iso9660_mount.c	Sun Oct  3 21:18:23 2010	(r883)
+++ trunk/openbios-devel/fs/iso9660/iso9660_mount.c	Sun Oct  3 21:18:26 2010	(r884)
@@ -15,7 +15,7 @@
 void iso9660_name(iso9660_VOLUME *volume, struct iso_directory_record *idr, char *buffer)
 {
 	int	j;
-	unsigned char	uh, ul, uc;
+        unsigned char ul, uc;
 
 	buffer[0] = 0;
 	if (idr->name_len[0] == 1 && idr->name[0] == 0)
@@ -32,7 +32,6 @@
 			 */
 
 			for (j = 0; j < (int)idr->name_len[0] / 2; j++) {
-				uh = idr->name[j*2];
 				ul = idr->name[j*2+1];
 
 				/*



More information about the OpenBIOS mailing list