WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Compile issue with tools/libfsimage/iso9660
From: Mathieu Desnoyers <compudj@xxxxxxxxxxxxxxxxxx>
Date: Sat, 3 Mar 2007 01:16:07 -0500
Delivery-date: Fri, 02 Mar 2007 22:15:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
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