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-changelog

[Xen-changelog] [xen-unstable] Fix libfsimage build on NetBSD.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix libfsimage build on NetBSD.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Sep 2007 03:41:12 -0700
Delivery-date: Wed, 26 Sep 2007 04:29:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1190546316 -3600
# Node ID 5957d62f72901859327506629a8c7a78e7417c4f
# Parent  f187dc338d8212a04690e38d9d1b15b24a0de207
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@xxxxxxx>

These ugly casts are needed according to the ISO C spec.

Acked-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/libfsimage/ext2fs/fsys_ext2fs.c     |    6 +++---
 tools/libfsimage/fat/fsys_fat.c           |   12 ++++++------
 tools/libfsimage/iso9660/fsys_iso9660.c   |    2 +-
 tools/libfsimage/reiserfs/fsys_reiserfs.c |    6 +++---
 tools/libfsimage/ufs/fsys_ufs.c           |    4 ++--
 5 files changed, 15 insertions(+), 15 deletions(-)

diff -r f187dc338d82 -r 5957d62f7290 tools/libfsimage/ext2fs/fsys_ext2fs.c
--- a/tools/libfsimage/ext2fs/fsys_ext2fs.c     Sat Sep 22 09:39:18 2007 +0100
+++ b/tools/libfsimage/ext2fs/fsys_ext2fs.c     Sun Sep 23 12:18:36 2007 +0100
@@ -594,7 +594,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna
 
          /* Find out how long our remaining name is. */
          len = 0;
-         while (dirname[len] && !isspace (dirname[len]))
+         while (dirname[len] && !isspace ((uint8_t)dirname[len]))
            len++;
 
          /* Get the symlink size. */
@@ -651,7 +651,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna
        }
 
       /* if end of filename, INODE points to the file's inode */
-      if (!*dirname || isspace (*dirname))
+      if (!*dirname || isspace ((uint8_t)*dirname))
        {
          if (!S_ISREG (INODE->i_mode))
            {
@@ -678,7 +678,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna
        }
 
       /* skip to next slash or end of filename (space) */
-      for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/';
+      for (rest = dirname; (ch = *rest) && !isspace ((uint8_t)ch) && ch != '/';
           rest++);
 
       /* look through this directory and find the next filename component */
diff -r f187dc338d82 -r 5957d62f7290 tools/libfsimage/fat/fsys_fat.c
--- a/tools/libfsimage/fat/fsys_fat.c   Sat Sep 22 09:39:18 2007 +0100
+++ b/tools/libfsimage/fat/fsys_fat.c   Sun Sep 23 12:18:36 2007 +0100
@@ -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--;
diff -r f187dc338d82 -r 5957d62f7290 tools/libfsimage/iso9660/fsys_iso9660.c
--- a/tools/libfsimage/iso9660/fsys_iso9660.c   Sat Sep 22 09:39:18 2007 +0100
+++ b/tools/libfsimage/iso9660/fsys_iso9660.c   Sun Sep 23 12:18:36 2007 +0100
@@ -164,7 +164,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn
       /* pathlen = strcspn(dirname, "/\n\t "); */
       for (pathlen = 0 ;
           dirname[pathlen]
-            && !isspace(dirname[pathlen]) && dirname[pathlen] != '/' ;
+            && !isspace((uint8_t)dirname[pathlen]) && dirname[pathlen] != '/' ;
           pathlen++)
        ;
 
diff -r f187dc338d82 -r 5957d62f7290 tools/libfsimage/reiserfs/fsys_reiserfs.c
--- a/tools/libfsimage/reiserfs/fsys_reiserfs.c Sat Sep 22 09:39:18 2007 +0100
+++ b/tools/libfsimage/reiserfs/fsys_reiserfs.c Sun Sep 23 12:18:36 2007 +0100
@@ -1029,7 +1029,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir
 
          /* Find out how long our remaining name is. */
          len = 0;
-         while (dirname[len] && !isspace (dirname[len]))
+         while (dirname[len] && !isspace ((uint8_t)dirname[len]))
            len++;
 
          if (filemax + len > sizeof (linkbuf) - 1)
@@ -1078,7 +1078,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir
       /* 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 (! S_ISREG (mode))
            {
@@ -1109,7 +1109,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir
          errnum = ERR_BAD_FILETYPE;
          return 0;
        }
-      for (rest = dirname; (ch = *rest) && ! isspace (ch) && ch != '/'; 
rest++);
+      for (rest = dirname; (ch = *rest) && ! isspace ((uint8_t)ch) && ch != 
'/'; rest++);
       *rest = 0;
       
 # ifndef STAGE1_5
diff -r f187dc338d82 -r 5957d62f7290 tools/libfsimage/ufs/fsys_ufs.c
--- a/tools/libfsimage/ufs/fsys_ufs.c   Sat Sep 22 09:39:18 2007 +0100
+++ b/tools/libfsimage/ufs/fsys_ufs.c   Sun Sep 23 12:18:36 2007 +0100
@@ -72,13 +72,13 @@ ufs_dir(fsi_file_t *ffi, char *dirname)
        while (*dirname == '/')
                dirname++;
 
-       while (inode && *dirname && !isspace(*dirname)) {
+       while (inode && *dirname && !isspace((uint8_t)*dirname)) {
                if (!openi(ffi, inode))
                        return 0;
 
                /* parse for next path component */
                fname = dirname;
-               while (*dirname && !isspace(*dirname) && *dirname != '/')
+               while (*dirname && !isspace((uint8_t)*dirname) && *dirname != 
'/')
                        dirname++;
                ch = *dirname;
                *dirname = 0;   /* ensure null termination */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix libfsimage build on NetBSD., Xen patchbot-unstable <=