diff options
author | Keir Fraser <keir@xensource.com> | 2007-09-23 12:18:36 +0100 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-09-23 12:18:36 +0100 |
commit | d6f6960a00a6872da0e554aa1a71e634a36226be (patch) | |
tree | 0bbc04013d95b2912eb04fe95f8d94da1bd0ef89 /tools/libfsimage/fat | |
parent | d68181c014cb8c33a8cbdeef2024377c48d9cb7f (diff) | |
download | xen-d6f6960a00a6872da0e554aa1a71e634a36226be.tar.gz xen-d6f6960a00a6872da0e554aa1a71e634a36226be.tar.bz2 xen-d6f6960a00a6872da0e554aa1a71e634a36226be.zip |
Fix libfsimage build on NetBSD.
Fixes a number of these errors:
cc1: warnings being treated as errors
fsys_fat.c: In function 'fat_dir':
fsys_fat.c:304: warning: array subscript has type 'char'
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
These ugly casts are needed according to the ISO C spec.
Acked-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/libfsimage/fat')
-rw-r--r-- | tools/libfsimage/fat/fsys_fat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/libfsimage/fat/fsys_fat.c b/tools/libfsimage/fat/fsys_fat.c index a0afb87f49..819465a16b 100644 --- a/tools/libfsimage/fat/fsys_fat.c +++ b/tools/libfsimage/fat/fsys_fat.c @@ -301,7 +301,7 @@ fat_dir (fsi_file_t *ffi, char *dirname) /* if we have a real file (and we're not just printing possibilities), then this is where we want to exit */ - if (!*dirname || isspace (*dirname)) + if (!*dirname || isspace ((uint8_t)*dirname)) { if (attrib & FAT_ATTRIB_DIR) { @@ -325,7 +325,7 @@ fat_dir (fsi_file_t *ffi, char *dirname) /* Directories don't have a file size */ filemax = INT_MAX; - for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; rest++); + for (rest = dirname; (ch = *rest) && !isspace ((uint8_t)ch) && ch != '/'; rest++); *rest = 0; @@ -426,13 +426,13 @@ fat_dir (fsi_file_t *ffi, char *dirname) { int i, j, c; - for (i = 0; i < 8 && (c = filename[i] = tolower (dir_buf[i])) - && !isspace (c); i++); + for (i = 0; i < 8 && (c = filename[i] = tolower ((uint8_t)dir_buf[i])) + && !isspace ((uint8_t)c); i++); filename[i++] = '.'; - for (j = 0; j < 3 && (c = filename[i + j] = tolower (dir_buf[8 + j])) - && !isspace (c); j++); + for (j = 0; j < 3 && (c = filename[i + j] = tolower ((uint8_t)dir_buf[8 + j])) + && !isspace ((uint8_t)c); j++); if (j == 0) i--; |