X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00, FH_DATE_PAST_20XX autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id o0K8THGw254123 for ; Wed, 20 Jan 2010 02:29:18 -0600 X-ASG-Debug-ID: 1263976218-7ea101130000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id B2C5E1C64CAC for ; Wed, 20 Jan 2010 00:30:18 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id aNjq9CrAfstpAX27 for ; Wed, 20 Jan 2010 00:30:18 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1NXVxC-0002Ie-Cj; Wed, 20 Jan 2010 08:30:18 +0000 Date: Wed, 20 Jan 2010 03:30:18 -0500 From: Christoph Hellwig To: Dave Chinner Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c Subject: Re: [PATCH 4/8] xfstests: fix printf format warnings in aio-stress.c Message-ID: <20100120083018.GD6721@infradead.org> References: <1263958688-435-1-git-send-email-david@fromorbit.com> <1263958688-435-5-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1263958688-435-5-git-send-email-david@fromorbit.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1263976218 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean > 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