From: Mathieu Desnoyers <compudj@krystal.dyndns.org>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Compile issue with tools/libfsimage/iso9660
Date: Sat, 3 Mar 2007 01:16:07 -0500 [thread overview]
Message-ID: <20070303061606.GA29422@Krystal> (raw)
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
next reply other threads:[~2007-03-03 6:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-03 6:16 Mathieu Desnoyers [this message]
2007-03-04 12:42 ` [PATCH] Compile issue with tools/libfsimage/iso9660 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070303061606.GA29422@Krystal \
--to=compudj@krystal.dyndns.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.