[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libfs: Fix build with gcc4.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172084088 0
# Node ID 335a8280ab1d9a874f98e293828a04f642185fba
# Parent  af3281c66e7310cd0abe1a3f30de905d92ca6858
libfs: Fix build with gcc4.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/libfsimage/iso9660/fsys_iso9660.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r af3281c66e73 -r 335a8280ab1d tools/libfsimage/iso9660/fsys_iso9660.c
--- a/tools/libfsimage/iso9660/fsys_iso9660.c   Wed Feb 21 16:33:34 2007 +0000
+++ b/tools/libfsimage/iso9660/fsys_iso9660.c   Wed Feb 21 18:54:48 2007 +0000
@@ -184,7 +184,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn
          for (; idr->length.l > 0;
               idr = (struct iso_directory_record *)((char *)idr + 
idr->length.l) )
            {
-             const char *name = idr->name;
+             const char *name = (const char *)idr->name;
              unsigned int name_len = idr->name_len.l;
 
              file_type = (idr->flags.l & 2) ? ISO_DIRECTORY : ISO_REGULAR;
@@ -207,7 +207,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn
              rr_len = (idr->length.l - idr->name_len.l
                        - sizeof(struct iso_directory_record)
                        + 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)
@@ -237,7 +237,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn
                            rr_flag &= rr_ptr.rr->u.rr.flags.l;
                          break;
                        case RRMAGIC('N', 'M'):
-                         name = rr_ptr.rr->u.nm.name;
+                         name = (const char *)rr_ptr.rr->u.nm.name;
                          name_len = rr_ptr.rr->len - (4+sizeof(struct NM));
                          rr_flag &= ~RR_FLAG_NM;
                          break;
@@ -338,11 +338,11 @@ iso9660_dir (fsi_file_t *ffi, char *dirn
                          && (unsigned char *)name < RRCONT_BUF + 
ISO_SECTOR_SIZE )
                        {
                          memcpy(NAME_BUF, name, name_len);
-                         name = NAME_BUF;
+                         name = (const 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(ffi, ce_ptr->u.ce.extent.l, 0, 
ISO_SECTOR_SIZE, RRCONT_BUF))
+                     if (!iso9660_devread(ffi, ce_ptr->u.ce.extent.l, 0, 
ISO_SECTOR_SIZE, (char *)RRCONT_BUF))
                        {
                          errnum = 0;   /* this is not fatal. */
                          break;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.