[PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c
Christoph Hellwig
hch at infradead.org
Wed Jan 20 02:30:18 CST 2010
> 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 at lst.de>
More information about the xfs
mailing list