* [PATCH 0/8] xfstests: fix compile warnings
@ 2010-01-20 3:38 Dave Chinner
2010-01-20 3:38 ` [PATCH 1/8] xfstests: fix compile warning in doio.c Dave Chinner
` (8 more replies)
0 siblings, 9 replies; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
This series fixes all the compile warnings when building xfstests.
It doesn't deal with the dmapi subdirectory but cleans everything else
up.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/8] xfstests: fix compile warning in doio.c
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
@ 2010-01-20 3:38 ` Dave Chinner
2010-01-20 8:26 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 2/8] xfstests: fix bulkstat related compile warnings Dave Chinner
` (7 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
Use of sigblock is deprecated. Use sigprocmask instead.
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
ltp/doio.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ltp/doio.c b/ltp/doio.c
index a1c92c9..0fe206d 100644
--- a/ltp/doio.c
+++ b/ltp/doio.c
@@ -350,7 +350,7 @@ char **argv;
{
int i, pid, stat, ex_stat;
struct sigaction sa;
- int omask;
+ sigset_t block_mask, old_mask;
umask(0); /* force new file modes to known values */
#if _CRAYMPP
Npes = sysconf(_SC_CRAY_NPES); /* must do this before parse_cmdline */
@@ -434,7 +434,9 @@ char **argv;
Children[i] = -1;
}
- omask = sigblock(sigmask(SIGCLD));
+ sigemptyset(&block_mask);
+ sigaddset(&block_mask, SIGCHLD);
+ sigprocmask(SIG_BLOCK, &block_mask, &old_mask);
/*
* Fork Nprocs. This [parent] process is a watchdog, to notify the
--
1.6.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/8] xfstests: fix bulkstat related compile warnings.
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
2010-01-20 3:38 ` [PATCH 1/8] xfstests: fix compile warning in doio.c Dave Chinner
@ 2010-01-20 3:38 ` Dave Chinner
2010-01-20 8:26 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 3/8] xfstests: Don't use tempnam in growfiles.c Dave Chinner
` (6 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
Use correct types for bulkstat structure to avoid pointer warnings.
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/8] xfstests: Don't use tempnam in growfiles.c
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
2010-01-20 3:38 ` [PATCH 1/8] xfstests: fix compile warning in doio.c Dave Chinner
2010-01-20 3:38 ` [PATCH 2/8] xfstests: fix bulkstat related compile warnings Dave Chinner
@ 2010-01-20 3:38 ` Dave Chinner
2010-01-20 8:28 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c Dave Chinner
` (5 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
tempnam() generates a compiler warning as a dangerous function.
This code doesn't care about security issues with tempnam, so
remove it and just manually build the filenames without the
randomness of tempnam.
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
ltp/growfiles.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/ltp/growfiles.c b/ltp/growfiles.c
index a987b5a..52c9079 100644
--- a/ltp/growfiles.c
+++ b/ltp/growfiles.c
@@ -1162,10 +1162,9 @@ no whole file checking will be performed!\n", Progname, TagName, (int)getpid());
/*
* construct auto filename and insert them into filenames space
*/
-
for(ind=0;ind<num_auto_files; ind++, num++) {
- sprintf((char *)filenames+(num*PATH_MAX), "%s.%d",
- tempnam(auto_dir, auto_file), ind );
+ sprintf((char *)filenames+(num*PATH_MAX), "%s/%s.%d",
+ auto_dir, auto_file, ind);
}
/*
--
1.6.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
` (2 preceding siblings ...)
2010-01-20 3:38 ` [PATCH 3/8] xfstests: Don't use tempnam in growfiles.c Dave Chinner
@ 2010-01-20 3:38 ` Dave Chinner
2010-01-20 8:30 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 5/8] xfstests: fix compile warnings in iopat.c Dave Chinner
` (4 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
ltp/aio-stress.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/ltp/aio-stress.c b/ltp/aio-stress.c
index ab9e006..57a2158 100644
--- a/ltp/aio-stress.c
+++ b/ltp/aio-stress.c
@@ -1167,9 +1167,9 @@ restart:
if (t->stage_mb_trans && t->num_files > 0) {
double seconds = time_since_now(&stage_time);
- fprintf(stderr, "thread %d %s totals (%.2f MB/s) %.2f MB in %.2fs\n",
- t - global_thread_info, this_stage, t->stage_mb_trans/seconds,
- t->stage_mb_trans, seconds);
+ fprintf(stderr, "thread %llu %s totals (%.2f MB/s) %.2f MB in %.2fs\n",
+ (unsigned long long)(t - global_thread_info), this_stage,
+ t->stage_mb_trans/seconds, t->stage_mb_trans, seconds);
}
if (num_threads > 1) {
@@ -1449,16 +1449,19 @@ int main(int ac, char **av)
if (file_size < num_contexts * context_offset) {
fprintf(stderr, "file size %Lu too small for %d contexts\n",
- file_size, num_contexts);
+ (unsigned long long)file_size, num_contexts);
exit(1);
}
- fprintf(stderr, "file size %LuMB, record size %luKB, depth %d, ios per iteration %d\n", file_size / (1024 * 1024), rec_len / 1024, depth, io_iter);
+ fprintf(stderr, "file size %LuMB, record size %luKB, depth %d, ios per iteration %d\n",
+ (unsigned long long)file_size / (1024 * 1024),
+ rec_len / 1024, depth, io_iter);
fprintf(stderr, "max io_submit %d, buffer alignment set to %luKB\n",
max_io_submit, (page_size_mask + 1)/1024);
fprintf(stderr, "threads %d files %d contexts %d context offset %LuMB verification %s\n",
num_threads, num_files, num_contexts,
- context_offset / (1024 * 1024), verify ? "on" : "off");
+ (unsigned long long)context_offset / (1024 * 1024),
+ verify ? "on" : "off");
/* open all the files and do any required setup for them */
for (i = optind ; i < ac ; i++) {
int thread_index;
--
1.6.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/8] xfstests: fix compile warnings in iopat.c
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
` (3 preceding siblings ...)
2010-01-20 3:38 ` [PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c Dave Chinner
@ 2010-01-20 3:38 ` Dave Chinner
2010-01-20 8:31 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 6/8] xfstests: fix printf format warnings in looptest.c Dave Chinner
` (3 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
Printf format warnings and return value warnings need fixing.
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
src/iopat.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/iopat.c b/src/iopat.c
index c06071f..f34de19 100644
--- a/src/iopat.c
+++ b/src/iopat.c
@@ -47,12 +47,13 @@ int main(int argc, char **argv)
read(fd, &x, 1048576);
for (i = 0; i < 131072; i++) {
if (x[i] != i) {
- printf("error: %d %d %d\n",i,8*i,x[i]);
+ printf("error: %d %d %lld\n", i ,8 * i, (long long)x[i]);
exit(1);
}
}
#endif
close(fd);
+ exit(0);
}
--
1.6.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/8] xfstests: fix printf format warnings in looptest.c
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
` (4 preceding siblings ...)
2010-01-20 3:38 ` [PATCH 5/8] xfstests: fix compile warnings in iopat.c Dave Chinner
@ 2010-01-20 3:38 ` Dave Chinner
2010-01-20 8:32 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 7/8] xfstests: fix printf warnings in locktest.c Dave Chinner
` (2 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
src/looptest.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/looptest.c b/src/looptest.c
index d951f2b..3d99f38 100755
--- a/src/looptest.c
+++ b/src/looptest.c
@@ -202,7 +202,7 @@ main(int argc, char *argv[])
if ((flags & FLAG_OPENCLOSE) && (flags & FLAG_SEQUENTIAL)) {
if (flags & FLAG_VERBOSE)
- printf("seek %" LL "d\n", seek_to);
+ printf("seek %" LL "d\n", (long long)seek_to);
if (SEEK(f, seek_to, FILE_BEGIN) < 0)
PERROR("SEEK", GET_LAST_ERROR);
}
@@ -212,7 +212,7 @@ main(int argc, char *argv[])
if (!(flags & FLAG_SEQUENTIAL)) {
if (flags & FLAG_VERBOSE)
- printf("seek %" LL "d\n", seek_to);
+ printf("seek %" LL "d\n", (long long)seek_to);
if (SEEK(f, seek_to, FILE_BEGIN) < 0)
PERROR("SEEK", GET_LAST_ERROR);
}
@@ -233,7 +233,7 @@ main(int argc, char *argv[])
if (!(flags & FLAG_SEQUENTIAL) || (flags & FLAG_WRITE)) {
if (flags & FLAG_VERBOSE)
- printf("seek %" LL "d\n", seek_to);
+ printf("seek %" LL "d\n", (long long)seek_to);
if (SEEK(f, seek_to, FILE_BEGIN) < 0)
PERROR("SEEK", GET_LAST_ERROR);
}
@@ -279,7 +279,7 @@ main(int argc, char *argv[])
seek_to += bufsize;
if (flags & FLAG_TRUNCATE) {
if (flags & FLAG_VERBOSE)
- printf("seek %" LL "d\n", seek_to);
+ printf("seek %" LL "d\n", (long long)seek_to);
if (SEEK(f, seek_to, FILE_BEGIN) < 0)
PERROR("SEEK", GET_LAST_ERROR);
}
--
1.6.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 7/8] xfstests: fix printf warnings in locktest.c
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
` (5 preceding siblings ...)
2010-01-20 3:38 ` [PATCH 6/8] xfstests: fix printf format warnings in looptest.c Dave Chinner
@ 2010-01-20 3:38 ` Dave Chinner
2010-01-20 8:32 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 8/8] xfstests: don't redefine _GNU_SOURCE in aio tests Dave Chinner
2010-01-20 22:02 ` [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
8 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
src/locktest.c | 35 ++++++++++++++++++++---------------
1 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/src/locktest.c b/src/locktest.c
index 7552ace..a108b6f 100644
--- a/src/locktest.c
+++ b/src/locktest.c
@@ -718,7 +718,7 @@ send_ctl(void)
if (debug > 1) {
fprintf(stderr, "send_ctl: test=%d, command=%d offset=%"LL"d, length=%"LL"d, result=%d, error=%d\n",
- ctl.test, ctl.command, ctl.offset, ctl.length,ctl.result, ctl.error);
+ ctl.test, ctl.command, (long long)ctl.offset, (long long)ctl.length,ctl.result, ctl.error);
}
ctl.test= bswap_uint32(ctl.test);
@@ -741,7 +741,7 @@ send_ctl(void)
if (nwrite < 0)
perror("send_ctl: write");
else
- fprintf(stderr, "send_ctl[%d]: write() returns %d, not %d as expected\n",
+ fprintf(stderr, "send_ctl[%d]: write() returns %d, not %lu as expected\n",
ctl.test, nwrite, sizeof(ctl));
exit(1);
/*NOTREACHED*/
@@ -756,7 +756,7 @@ void recv_ctl(void)
if (nread < 0)
perror("recv_ctl: read");
else {
- fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %d as expected\n",
+ fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %lu as expected\n",
ctl.test, nread, sizeof(ctl));
fprintf(stderr, "socket might has been closed by other locktest\n");
}
@@ -773,7 +773,7 @@ void recv_ctl(void)
if (debug > 1) {
fprintf(stderr, "recv_ctl: test=%d, command=%d offset=%"LL"d, length=%"LL"d, result=%d, error=%d\n",
- ctl.test, ctl.command, ctl.offset, ctl.length, ctl.result, ctl.error);
+ ctl.test, ctl.command, (long long)ctl.offset, (long long)ctl.length, ctl.result, ctl.error);
}
}
@@ -1040,14 +1040,16 @@ main(int argc, char *argv[])
fail_flag++;
/* We have a failure */
if(debug)
- fprintf(stderr, "Server failure in test %d, while %sing using offset %llu, length %llu - err = %d:%s\n",
+ fprintf(stderr, "Server failure in test %d, while %sing using offset %lld, length %lld - err = %d:%s\n",
ctl.test, tests[index][COMMAND]==WRLOCK?"write lock":
tests[index][COMMAND]==RDLOCK?"read lock":
tests[index][COMMAND]==UNLOCK?"unlock":
tests[index][COMMAND]==F_OPEN?"open":"clos",
- tests[index][OFFSET], tests[index][LENGTH], saved_errno, strerror(saved_errno));
- fprintf(stderr, "Server failure in %llu:%s\n",
- tests[index][TEST_NUM],
+ (long long)tests[index][OFFSET],
+ (long long)tests[index][LENGTH],
+ saved_errno, strerror(saved_errno));
+ fprintf(stderr, "Server failure in %lld:%s\n",
+ (long long)tests[index][TEST_NUM],
descriptions[tests[index][TEST_NUM] - 1]);
}
}
@@ -1058,12 +1060,13 @@ main(int argc, char *argv[])
end=1;
}
if(debug > 1)
- fprintf(stderr, "Sending command to client (%d) - %s - %llu:%llu\n",
+ fprintf(stderr, "Sending command to client (%d) - %s - %lld:%lld\n",
index, tests[index][COMMAND]==WRLOCK?"write lock":
tests[index][COMMAND]==RDLOCK?"read lock":
tests[index][COMMAND]==UNLOCK?"unlock":
tests[index][COMMAND]==F_OPEN?"open":"clos",
- tests[index][OFFSET], tests[index][LENGTH]);
+ (long long)tests[index][OFFSET],
+ (long long)tests[index][LENGTH]);
/* get the client to do something */
ctl.index = index;
send_ctl();
@@ -1075,14 +1078,15 @@ main(int argc, char *argv[])
if( ctl.result == FAIL ) {
fail_flag++;
if(debug)
- fprintf(stderr, "Client failure in test %d, while %sing using offset %llu, length %llu - err = %d:%s\n",
+ fprintf(stderr, "Client failure in test %d, while %sing using offset %lld, length %lld - err = %d:%s\n",
ctl.test, ctl.command==WRLOCK?"write lock":
ctl.command==RDLOCK?"read lock":
ctl.command==UNLOCK?"unlock":
ctl.command==F_OPEN?"open":"clos",
- ctl.offset, ctl.length, ctl.error, strerror(ctl.error));
- fprintf(stderr, "Client failure in %llu:%s\n",
- tests[index][TEST_NUM],
+ (long long)ctl.offset, (long long)ctl.length,
+ ctl.error, strerror(ctl.error));
+ fprintf(stderr, "Client failure in %lld:%s\n",
+ (long long)tests[index][TEST_NUM],
descriptions[tests[index][TEST_NUM] - 1]);
}
}
@@ -1144,7 +1148,8 @@ main(int argc, char *argv[])
}
if( result != tests[index][RESULT] ) {
if(debug)
- fprintf(stderr,"Got %d, wanted %llu\n", result, tests[index][RESULT]);
+ fprintf(stderr,"Got %d, wanted %lld\n", result,
+ (long long)tests[index][RESULT]);
ctl.result = FAIL;
ctl.error = saved_errno;
fail_count++;
--
1.6.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 8/8] xfstests: don't redefine _GNU_SOURCE in aio tests
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
` (6 preceding siblings ...)
2010-01-20 3:38 ` [PATCH 7/8] xfstests: fix printf warnings in locktest.c Dave Chinner
@ 2010-01-20 3:38 ` Dave Chinner
2010-01-20 8:33 ` Christoph Hellwig
2010-01-20 22:02 ` [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
8 siblings, 1 reply; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 3:38 UTC (permalink / raw)
To: xfs
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
src/aio-dio-regress/aio-dio-subblock-eof-read.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/aio-dio-regress/aio-dio-subblock-eof-read.c b/src/aio-dio-regress/aio-dio-subblock-eof-read.c
index cbcff97..a48841d 100644
--- a/src/aio-dio-regress/aio-dio-subblock-eof-read.c
+++ b/src/aio-dio-regress/aio-dio-subblock-eof-read.c
@@ -31,8 +31,6 @@
* worth of data, and the user issued a 4k read, we want to ensure that
* the return value is 300, not 4k.
*/
-
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <libaio.h>
--
1.6.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/8] xfstests: fix compile warning in doio.c
2010-01-20 3:38 ` [PATCH 1/8] xfstests: fix compile warning in doio.c Dave Chinner
@ 2010-01-20 8:26 ` Christoph Hellwig
0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2010-01-20 8:26 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/8] xfstests: fix bulkstat related compile warnings.
2010-01-20 3:38 ` [PATCH 2/8] xfstests: fix bulkstat related compile warnings Dave Chinner
@ 2010-01-20 8:26 ` Christoph Hellwig
0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2010-01-20 8:26 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/8] xfstests: Don't use tempnam in growfiles.c
2010-01-20 3:38 ` [PATCH 3/8] xfstests: Don't use tempnam in growfiles.c Dave Chinner
@ 2010-01-20 8:28 ` Christoph Hellwig
0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2010-01-20 8:28 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On Wed, Jan 20, 2010 at 02:38:03PM +1100, Dave Chinner wrote:
> tempnam() generates a compiler warning as a dangerous function.
> This code doesn't care about security issues with tempnam, so
> remove it and just manually build the filenames without the
> randomness of tempnam.
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
Btw, I wonder if we should sync back changes to the ltp/* files to LTP..
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c
2010-01-20 3:38 ` [PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c Dave Chinner
@ 2010-01-20 8:30 ` Christoph Hellwig
0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2010-01-20 8:30 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
> diff --git a/ltp/aio-stress.c b/ltp/aio-stress.c
> index ab9e006..57a2158 100644
> --- a/ltp/aio-stress.c
> +++ b/ltp/aio-stress.c
> @@ -1167,9 +1167,9 @@ restart:
>
> if (t->stage_mb_trans && t->num_files > 0) {
> double seconds = time_since_now(&stage_time);
> - fprintf(stderr, "thread %d %s totals (%.2f MB/s) %.2f MB in %.2fs\n",
> - t - global_thread_info, this_stage, t->stage_mb_trans/seconds,
> - t->stage_mb_trans, seconds);
> + fprintf(stderr, "thread %llu %s totals (%.2f MB/s) %.2f MB in %.2fs\n",
> + (unsigned long long)(t - global_thread_info), this_stage,
> + t->stage_mb_trans/seconds, t->stage_mb_trans, seconds);
Differences between two pointers in C99 is a ptrdiff_t. Probably not
worth searching the printf sepcifier for it and just casting it up, so
ok.
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 5/8] xfstests: fix compile warnings in iopat.c
2010-01-20 3:38 ` [PATCH 5/8] xfstests: fix compile warnings in iopat.c Dave Chinner
@ 2010-01-20 8:31 ` Christoph Hellwig
0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2010-01-20 8:31 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On Wed, Jan 20, 2010 at 02:38:05PM +1100, Dave Chinner wrote:
> Printf format warnings and return value warnings need fixing.
>
> Signed-off-by: Dave Chinner <david@fromorbit.com>
> ---
> src/iopat.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/iopat.c b/src/iopat.c
> index c06071f..f34de19 100644
> --- a/src/iopat.c
> +++ b/src/iopat.c
> @@ -47,12 +47,13 @@ int main(int argc, char **argv)
> read(fd, &x, 1048576);
> for (i = 0; i < 131072; i++) {
> if (x[i] != i) {
> - printf("error: %d %d %d\n",i,8*i,x[i]);
> + printf("error: %d %d %lld\n", i ,8 * i, (long long)x[i]);
> exit(1);
Instead of the casting we could also use the C99 macro for the uin64_t
format. But either way good enough for the tests,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 6/8] xfstests: fix printf format warnings in looptest.c
2010-01-20 3:38 ` [PATCH 6/8] xfstests: fix printf format warnings in looptest.c Dave Chinner
@ 2010-01-20 8:32 ` Christoph Hellwig
0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2010-01-20 8:32 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On Wed, Jan 20, 2010 at 02:38:06PM +1100, Dave Chinner wrote:
> Signed-off-by: Dave Chinner <david@fromorbit.com>
> ---
> src/looptest.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/looptest.c b/src/looptest.c
> index d951f2b..3d99f38 100755
> --- a/src/looptest.c
> +++ b/src/looptest.c
> @@ -202,7 +202,7 @@ main(int argc, char *argv[])
>
> if ((flags & FLAG_OPENCLOSE) && (flags & FLAG_SEQUENTIAL)) {
> if (flags & FLAG_VERBOSE)
> - printf("seek %" LL "d\n", seek_to);
> + printf("seek %" LL "d\n", (long long)seek_to);
> if (SEEK(f, seek_to, FILE_BEGIN) < 0)
> PERROR("SEEK", GET_LAST_ERROR);
> seek_to += bufsize;
Ok.
Reviewed-by: Christoph Hellwig <hch@lst.de>
What an ugly code in this file, urggg.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/8] xfstests: fix printf warnings in locktest.c
2010-01-20 3:38 ` [PATCH 7/8] xfstests: fix printf warnings in locktest.c Dave Chinner
@ 2010-01-20 8:32 ` Christoph Hellwig
0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2010-01-20 8:32 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On Wed, Jan 20, 2010 at 02:38:07PM +1100, Dave Chinner wrote:
> Signed-off-by: Dave Chinner <david@fromorbit.com>
> ---
> src/locktest.c | 35 ++++++++++++++++++++---------------
> 1 files changed, 20 insertions(+), 15 deletions(-)
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 8/8] xfstests: don't redefine _GNU_SOURCE in aio tests
2010-01-20 3:38 ` [PATCH 8/8] xfstests: don't redefine _GNU_SOURCE in aio tests Dave Chinner
@ 2010-01-20 8:33 ` Christoph Hellwig
0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hellwig @ 2010-01-20 8:33 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On Wed, Jan 20, 2010 at 02:38:08PM +1100, Dave Chinner wrote:
> Signed-off-by: Dave Chinner <david@fromorbit.com>
Yes, I think Eric fixed this in most others earlier already.
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] xfstests: fix compile warnings
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
` (7 preceding siblings ...)
2010-01-20 3:38 ` [PATCH 8/8] xfstests: don't redefine _GNU_SOURCE in aio tests Dave Chinner
@ 2010-01-20 22:02 ` Dave Chinner
8 siblings, 0 replies; 18+ messages in thread
From: Dave Chinner @ 2010-01-20 22:02 UTC (permalink / raw)
To: xfs
On Wed, Jan 20, 2010 at 02:38:00PM +1100, Dave Chinner wrote:
> This series fixes all the compile warnings when building xfstests.
> It doesn't deal with the dmapi subdirectory but cleans everything else
> up.
Pushed into xfstests-dev tree.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2010-01-20 22:01 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20 3:38 [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
2010-01-20 3:38 ` [PATCH 1/8] xfstests: fix compile warning in doio.c Dave Chinner
2010-01-20 8:26 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 2/8] xfstests: fix bulkstat related compile warnings Dave Chinner
2010-01-20 8:26 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 3/8] xfstests: Don't use tempnam in growfiles.c Dave Chinner
2010-01-20 8:28 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c Dave Chinner
2010-01-20 8:30 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 5/8] xfstests: fix compile warnings in iopat.c Dave Chinner
2010-01-20 8:31 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 6/8] xfstests: fix printf format warnings in looptest.c Dave Chinner
2010-01-20 8:32 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 7/8] xfstests: fix printf warnings in locktest.c Dave Chinner
2010-01-20 8:32 ` Christoph Hellwig
2010-01-20 3:38 ` [PATCH 8/8] xfstests: don't redefine _GNU_SOURCE in aio tests Dave Chinner
2010-01-20 8:33 ` Christoph Hellwig
2010-01-20 22:02 ` [PATCH 0/8] xfstests: fix compile warnings Dave Chinner
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.