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@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@884 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2010-10-03 19:18:26 +00:00
parent b00e6c7085
commit 2491effd07
2 changed files with 2 additions and 4 deletions

View File

@@ -301,7 +301,7 @@ bucket *findbucket(bcache *cache, unsigned long bnum, bucket ***hslot)
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 @@ int reuse(bcache *cache, bucket *b, unsigned long bnum)
for (bptr = b, i = 0; i < HFS_BLOCKBUFSZ; ++i)
{
chain[i] = bptr;
bptr = bptr->cprev;
}
}

View File

@@ -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 @@ void iso9660_name(iso9660_VOLUME *volume, struct iso_directory_record *idr, char
*/
for (j = 0; j < (int)idr->name_len[0] / 2; j++) {
uh = idr->name[j*2];
ul = idr->name[j*2+1];
/*