All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Compile issue with tools/libfsimage/iso9660
@ 2007-03-03  6:16 Mathieu Desnoyers
  2007-03-04 12:42 ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Desnoyers @ 2007-03-03  6:16 UTC (permalink / raw)
  To: xen-devel

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@polymtl.ca>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-05  6:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-03  6:16 [PATCH] Compile issue with tools/libfsimage/iso9660 Mathieu Desnoyers
2007-03-04 12:42 ` Keir Fraser
2007-03-04 21:04   ` Mathieu Desnoyers
2007-03-04 22:23     ` Keir Fraser
2007-03-05  6:16       ` Mathieu Desnoyers
2007-03-05  6:18       ` Mathieu Desnoyers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.