mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user