xfs
[Top] [All Lists]

[PATCH 2/8] xfstests: fix bulkstat related compile warnings.

To: xfs@xxxxxxxxxxx
Subject: [PATCH 2/8] xfstests: fix bulkstat related compile warnings.
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 20 Jan 2010 14:38:02 +1100
In-reply-to: <1263958688-435-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1263958688-435-1-git-send-email-david@xxxxxxxxxxxxx>
Use correct types for bulkstat structure to avoid pointer warnings.

Signed-off-by: Dave Chinner <david@xxxxxxxxxxxxx>
---
 ltp/fsstress.c                      |    4 ++--
 src/bulkstat_unlink_test.c          |    2 +-
 src/bulkstat_unlink_test_modified.c |    2 +-
 src/t_immutable.c                   |    6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index 6978381..c37cddf 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -1550,7 +1550,7 @@ bulkstat_f(int opno, long r)
 {
        int             count;
        int             fd;
-       __uint64_t      last;
+       __u64           last;
        int             nent;
        xfs_bstat_t     *t;
        __int64_t       total;
@@ -1583,7 +1583,7 @@ bulkstat1_f(int opno, long r)
        pathname_t      f;
        int             fd;
        int             good;
-       __uint64_t      ino;
+       __u64           ino;
        struct stat64   s;
        xfs_bstat_t     t;
        int             v;
diff --git a/src/bulkstat_unlink_test.c b/src/bulkstat_unlink_test.c
index 17d07c0..afd69ff 100644
--- a/src/bulkstat_unlink_test.c
+++ b/src/bulkstat_unlink_test.c
@@ -68,7 +68,7 @@ main(int argc, char *argv[])
                printf("Iteration %d ... (%d files)", k, nfiles);
 
                memset(&a, 0, sizeof(xfs_fsop_bulkreq_t));
-               a.lastip = &last_inode;
+               a.lastip = (__u64 *)&last_inode;
                a.icount = nfiles;
                a.ubuffer = ret;
                a.ocount = &count;
diff --git a/src/bulkstat_unlink_test_modified.c 
b/src/bulkstat_unlink_test_modified.c
index 4acc912..3a50d61 100644
--- a/src/bulkstat_unlink_test_modified.c
+++ b/src/bulkstat_unlink_test_modified.c
@@ -61,7 +61,7 @@ main(int argc, char *argv[])
        memset(genlist, 0, nfiles * sizeof(__u32));
        memset(ret, 0, nfiles * sizeof(xfs_bstat_t));
        memset(&a, 0, sizeof(xfs_fsop_bulkreq_t));
-       a.lastip = &last_inode;
+       a.lastip = (__u64 *)&last_inode;
        a.icount = nfiles;
        a.ubuffer = ret;
        a.ocount = &count;
diff --git a/src/t_immutable.c b/src/t_immutable.c
index 07a36cd..7bb3154 100644
--- a/src/t_immutable.c
+++ b/src/t_immutable.c
@@ -283,7 +283,7 @@ static int test_immutable(const char *dir)
 
          ino = st.st_ino;
 
-         bulkreq.lastip = &ino;
+         bulkreq.lastip = (__u64 *)&ino;
          bulkreq.icount = 1;
          bulkreq.ubuffer = &bstat;
          bulkreq.ocount = NULL;
@@ -943,7 +943,7 @@ static int test_append(const char *dir)
 
          ino = st.st_ino;
 
-         bulkreq.lastip = &ino;
+         bulkreq.lastip = (__u64 *)&ino;
          bulkreq.icount = 1;
          bulkreq.ubuffer = &bstat;
          bulkreq.ocount = NULL;
@@ -1353,7 +1353,7 @@ static int test_append(const char *dir)
 
           ino = st.st_ino;
 
-          bulkreq.lastip = &ino;
+          bulkreq.lastip = (__u64 *)&ino;
           bulkreq.icount = 1;
           bulkreq.ubuffer = &bstat;
           bulkreq.ocount = NULL;
-- 
1.6.5

<Prev in Thread] Current Thread [Next in Thread>