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

[Xen-devel] [PATCH] Compile issue with tools/libfsimage/iso9660



Compile issue with tools/libfsimage/iso9660

char vs unsigned char signedness causes a warning when compiling
iso9660 (xen-unstable). This patch changes the unsigned char * for
char *.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>

diff -r 8eff89a69521 tools/libfsimage/iso9660/fsys_iso9660.c
--- a/tools/libfsimage/iso9660/fsys_iso9660.c   Fri Mar 02 18:42:00 2007 -0500
+++ b/tools/libfsimage/iso9660/fsys_iso9660.c   Fri Mar 02 23:59:19 2007 -0500
@@ -53,8 +53,8 @@ struct iso_inode_info {
     ((struct iso_inode_info *)(FSYS_BUF+sizeof(struct iso_sb_info)))
 #define PRIMDESC        ((struct iso_primary_descriptor *)(FSYS_BUF + 2048))
 #define DIRREC          ((struct iso_directory_record *)(FSYS_BUF + 4096))
-#define RRCONT_BUF      ((unsigned char *)(FSYS_BUF + 6144))
-#define NAME_BUF        ((unsigned char *)(FSYS_BUF + 8192))
+#define RRCONT_BUF      ((char *)(FSYS_BUF + 6144))
+#define NAME_BUF        ((char *)(FSYS_BUF + 8192))
 
 
 #define log2 grub_log2
@@ -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)
@@ -334,8 +334,8 @@ iso9660_dir (fsi_file_t *ffi, char *dirn
                  if (rr_len < 4 && ce_ptr != NULL)
                    {
                      /* preserve name before loading new extent. */
-                     if( RRCONT_BUF <= (unsigned char *)name
-                         && (unsigned char *)name < RRCONT_BUF + 
ISO_SECTOR_SIZE )
+                     if( RRCONT_BUF <= (char *)name
+                         && (char *)name < RRCONT_BUF + ISO_SECTOR_SIZE )
                        {
                          memcpy(NAME_BUF, name, name_len);
                          name = NAME_BUF;
diff -r 8eff89a69521 tools/libfsimage/iso9660/iso9660.h
--- a/tools/libfsimage/iso9660/iso9660.h        Fri Mar 02 18:42:00 2007 -0500
+++ b/tools/libfsimage/iso9660/iso9660.h        Sat Mar 03 01:14:37 2007 -0500
@@ -105,7 +105,7 @@ struct iso_directory_record {
   iso_8bit_t   interleave;
   iso_16bit_t  volume_seq_number;
   iso_8bit_t   name_len;
-  u_int8_t     name[1];
+  char         name[1];
 } __attribute__ ((packed));
 
 struct iso_primary_descriptor {
@@ -188,7 +188,7 @@ struct rock_ridge {
     } sl;
     struct NM {
       iso_8bit_t       flags;
-      u_int8_t name[0];
+      char             name[0];
     } nm;
     struct CL {
       iso_32bit_t      location;
-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

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


 


Rackspace

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