direct-io.hg
changeset 14038:335a8280ab1d
libfs: Fix build with gcc4.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Wed Feb 21 18:54:48 2007 +0000 (2007-02-21) |
parents | af3281c66e73 |
children | 87f31a0db841 |
files | tools/libfsimage/iso9660/fsys_iso9660.c |
line diff
1.1 --- a/tools/libfsimage/iso9660/fsys_iso9660.c Wed Feb 21 16:33:34 2007 +0000 1.2 +++ b/tools/libfsimage/iso9660/fsys_iso9660.c Wed Feb 21 18:54:48 2007 +0000 1.3 @@ -184,7 +184,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn 1.4 for (; idr->length.l > 0; 1.5 idr = (struct iso_directory_record *)((char *)idr + idr->length.l) ) 1.6 { 1.7 - const char *name = idr->name; 1.8 + const char *name = (const char *)idr->name; 1.9 unsigned int name_len = idr->name_len.l; 1.10 1.11 file_type = (idr->flags.l & 2) ? ISO_DIRECTORY : ISO_REGULAR; 1.12 @@ -207,7 +207,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn 1.13 rr_len = (idr->length.l - idr->name_len.l 1.14 - sizeof(struct iso_directory_record) 1.15 + sizeof(idr->name)); 1.16 - rr_ptr.ptr = ((unsigned char *)idr + idr->name_len.l 1.17 + rr_ptr.ptr = ((char *)idr + idr->name_len.l 1.18 + sizeof(struct iso_directory_record) 1.19 - sizeof(idr->name)); 1.20 if (rr_ptr.i & 1) 1.21 @@ -237,7 +237,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn 1.22 rr_flag &= rr_ptr.rr->u.rr.flags.l; 1.23 break; 1.24 case RRMAGIC('N', 'M'): 1.25 - name = rr_ptr.rr->u.nm.name; 1.26 + name = (const char *)rr_ptr.rr->u.nm.name; 1.27 name_len = rr_ptr.rr->len - (4+sizeof(struct NM)); 1.28 rr_flag &= ~RR_FLAG_NM; 1.29 break; 1.30 @@ -338,11 +338,11 @@ iso9660_dir (fsi_file_t *ffi, char *dirn 1.31 && (unsigned char *)name < RRCONT_BUF + ISO_SECTOR_SIZE ) 1.32 { 1.33 memcpy(NAME_BUF, name, name_len); 1.34 - name = NAME_BUF; 1.35 + name = (const char *)NAME_BUF; 1.36 } 1.37 - rr_ptr.ptr = RRCONT_BUF + ce_ptr->u.ce.offset.l; 1.38 + rr_ptr.ptr = (char *)RRCONT_BUF + ce_ptr->u.ce.offset.l; 1.39 rr_len = ce_ptr->u.ce.size.l; 1.40 - if (!iso9660_devread(ffi, ce_ptr->u.ce.extent.l, 0, ISO_SECTOR_SIZE, RRCONT_BUF)) 1.41 + if (!iso9660_devread(ffi, ce_ptr->u.ce.extent.l, 0, ISO_SECTOR_SIZE, (char *)RRCONT_BUF)) 1.42 { 1.43 errnum = 0; /* this is not fatal. */ 1.44 break;