Fix almost all remaining warnings

git-svn-id: svn://coreboot.org/openbios/openbios-devel@294 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-12-20 17:15:47 +00:00
parent 2324d53cb4
commit 7e21fc929d
23 changed files with 101 additions and 53 deletions

View File

@@ -141,7 +141,7 @@ iso9660_dir (char *dirname)
for (; idr->length.l > 0;
idr = (struct iso_directory_record *)((char *)idr + idr->length.l) )
{
const char *name = idr->name;
const char *name = (char *)idr->name;
unsigned int name_len = idr->name_len.l;
file_type = (idr->flags.l & 2) ? ISO_DIRECTORY : ISO_REGULAR;
@@ -164,7 +164,7 @@ iso9660_dir (char *dirname)
rr_len = (idr->length.l - idr->name_len.l
- (unsigned char)sizeof(struct iso_directory_record)
+ (unsigned char)sizeof(idr->name));
rr_ptr.ptr = ((unsigned char *)idr + idr->name_len.l
rr_ptr.ptr = ((char *)idr + idr->name_len.l
+ sizeof(struct iso_directory_record)
- sizeof(idr->name));
if (rr_ptr.i & 1)
@@ -190,7 +190,7 @@ iso9660_dir (char *dirname)
rr_flag &= rr_ptr.rr->u.rr.flags.l;
else if (rr_ptr.rr->signature == RRMAGIC('N', 'M'))
{
name = rr_ptr.rr->u.nm.name;
name = (char *)rr_ptr.rr->u.nm.name;
name_len = rr_ptr.rr->len - 5;
rr_flag &= ~RR_FLAG_NM;
}
@@ -222,11 +222,12 @@ iso9660_dir (char *dirname)
&& (unsigned char *)name < RRCONT_BUF + ISO_SECTOR_SIZE )
{
memcpy(NAME_BUF, name, name_len);
name = NAME_BUF;
name = (char *)NAME_BUF;
}
rr_ptr.ptr = RRCONT_BUF + ce_ptr->u.ce.offset.l;
rr_ptr.ptr = (char *)(RRCONT_BUF + ce_ptr->u.ce.offset.l);
rr_len = ce_ptr->u.ce.size.l;
if (!iso9660_devread(ce_ptr->u.ce.extent.l, 0, ISO_SECTOR_SIZE, RRCONT_BUF))
if (!iso9660_devread(ce_ptr->u.ce.extent.l, 0,
ISO_SECTOR_SIZE, (char *)RRCONT_BUF))
{
errnum = 0; /* this is not fatal. */
break;

View File

@@ -382,7 +382,7 @@ next_dentry (xfs_ino_t *ino)
default:
namelen = sfe->namelen;
*ino = sf_ino ((char *)sfe, namelen);
name = sfe->name;
name = (char *)sfe->name;
sfe = (xfs_dir2_sf_entry_t *)
((char *)sfe + namelen + 11 - xfs.i8param);
}

View File

@@ -66,11 +66,11 @@ typedef union {
typedef struct __iso_16bit {
u_int16_t l, b;
} iso_16bit_t __attribute__ ((packed));
} iso_16bit_t;
typedef struct __iso_32bit {
u_int32_t l, b;
} iso_32bit_t __attribute__ ((packed));
} iso_32bit_t;
typedef u_int8_t iso_date_t[7];