Skip to contentSkip to conversation

Compile issue with tools/libfsimage/iso9660

PATCH In review Mathieu Desnoyers 2 participants 6 messages Mar 3, 2007 – Mar 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 *.

tools/libfsimage/iso9660/fsys_iso9660.c +5 -5
diff -r 8eff89a69521 tools/libfsimage/iso9660/fsys_iso9660.c
@@ -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;
tools/libfsimage/iso9660/iso9660.h +2 -2
diff -r 8eff89a69521 tools/libfsimage/iso9660/iso9660.h
@@ -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;
Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#1 lore raw
Quoted 7 lines · Mathieu Desnoyers

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 *.

A similar patch has been in xen-unstable for a fortnight. Where do you get your bits from?

-- Keir

#2 lore raw
Quoted 4 lines · * Keir Fraser ([email protected]) wrote:
Quoted 2 lines · Mathieu Desnoyers

Compile issue with tools/libfsimage/iso9660

Quoted 9 lines
Quoted 5 lines

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

A similar patch has been in xen-unstable for a fortnight. Where do you get your bits from?

compudj@dijkstra:~/xen/xen-unstable-lttng.hg$ hg pull
pulling from http://xenbits.xensource.com/xen-unstable.hg
searching for changes
no changes found

Maybe something went wrong with the merge and I missed it ?

Quoted 3 lines

-- Keir

Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#3 lore raw
Quoted 6 lines · Mathieu Desnoyers
compudj@dijkstra:~/xen/xen-unstable-lttng.hg$ hg pull
pulling from http://xenbits.xensource.com/xen-unstable.hg
searching for changes
no changes found

Maybe something went wrong with the merge and I missed it ?

The existing changeset that fixes this issue is 14038:335a8280ab1d9a87. Perhaps you have pulled the latest changesets into your local repository but not updated you locally-checked-out copy? How do 'hg heads' and 'hg parents' match up for you?

-- Keir

#4 lore raw
Quoted 7 lines · * Keir Fraser ([email protected]) wrote:
Quoted 5 lines · Mathieu Desnoyers
compudj@dijkstra:~/xen/xen-unstable-lttng.hg$ hg pull
pulling from http://xenbits.xensource.com/xen-unstable.hg
searching for changes
no changes found
Quoted 6 lines
Quoted 1 line

Maybe something went wrong with the merge and I missed it ?

The existing changeset that fixes this issue is 14038:335a8280ab1d9a87. Perhaps you have pulled the latest changesets into your local repository but not updated you locally-checked-out copy? How do 'hg heads' and 'hg parents' match up for you?

I have :

compudj@dijkstra:~/xen/xen-unstable-lttng.hg$ hg heads
changeset:   14209:d62b52c15b53
tag:         tip
user:        [email protected]
date:        Sat Mar 03 03:04:05 2007 -0500
summary:     ltt-tracer.c compiles ok.
changeset:   14206:3ac19fda0bc2
user:        [email protected]
date:        Fri Mar 02 12:11:52 2007 +0000
summary:     linux: Support new 'fast suspend' mode which does not

require us to

dijkstra:~/xen/xen-unstable-lttng.hg$ hg parents
changeset:   14209:d62b52c15b53
tag:         tip
user:        [email protected]
date:        Sat Mar 03 03:04:05 2007 -0500
summary:     ltt-tracer.c compiles ok.

I guess I should merge 14206:3ac19fda0bc2 into tip ?

Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#5 lore raw
In reply to Keir Fraser
Quoted 7 lines · * Keir Fraser ([email protected]) wrote:
Quoted 5 lines · Mathieu Desnoyers
compudj@dijkstra:~/xen/xen-unstable-lttng.hg$ hg pull
pulling from http://xenbits.xensource.com/xen-unstable.hg
searching for changes
no changes found
Quoted 10 lines
Quoted 1 line

Maybe something went wrong with the merge and I missed it ?

The existing changeset that fixes this issue is 14038:335a8280ab1d9a87. Perhaps you have pulled the latest changesets into your local repository but not updated you locally-checked-out copy? How do 'hg heads' and 'hg parents' match up for you?

-- Keir

The issue seems solved :

compudj@dijkstra:~/xen/xen-unstable-lttng.hg$ hg merge 14206
merging tools/libfsimage/iso9660/fsys_iso9660.c
merging xen/common/sysctl.c
merging xen/include/asm-x86/config.h
345 files updated, 3 files merged, 1 files removed, 0 files unresolved

Thanks,

Mathieu

Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68