From patchwork Fri Feb 12 17:41:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 8294291 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7069AC02AA for ; Fri, 12 Feb 2016 17:42:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8D7B20429 for ; Fri, 12 Feb 2016 17:42:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C41792041F for ; Fri, 12 Feb 2016 17:42:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbcBLRmB (ORCPT ); Fri, 12 Feb 2016 12:42:01 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:18223 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbcBLRl7 (ORCPT ); Fri, 12 Feb 2016 12:41:59 -0500 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1CHfuuQ005521 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 12 Feb 2016 17:41:56 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u1CHftaf016912 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 12 Feb 2016 17:41:56 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u1CHftIQ011932; Fri, 12 Feb 2016 17:41:55 GMT Received: from localhost (/24.21.154.84) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 12 Feb 2016 09:41:55 -0800 Date: Fri, 12 Feb 2016 09:41:54 -0800 From: "Darrick J. Wong" To: david@fromorbit.com Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org, xfs@oss.sgi.com Subject: [PATCH 33/32] aiocp: fix the gcc warnings Message-ID: <20160212174154.GF6346@birch.djwong.org> References: <20160211233916.2202.40961.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160211233916.2202.40961.stgit@birch.djwong.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Eliminate a debug printf that was causing warnings and fix the other two debug printfs to avoid tripping on return value warnings. Signed-off-by: Darrick J. Wong --- src/aio-dio-regress/aiocp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/aio-dio-regress/aiocp.c b/src/aio-dio-regress/aiocp.c index 1abff9c..ccab2ac 100644 --- a/src/aio-dio-regress/aiocp.c +++ b/src/aio-dio-regress/aiocp.c @@ -190,7 +190,7 @@ static void wr_done(io_context_t ctx, struct iocb *iocb, long res, long res2) --busy; free_iocb(iocb); if (debug) - write(2, "w", 1); + fprintf(stderr, "w"); } /* @@ -225,7 +225,7 @@ static void rd_done(io_context_t ctx, struct iocb *iocb, long res, long res2) io_error("io_submit write", res); } if (debug) - write(2, "r", 1); + fprintf(stderr, "r"); if (debug > 1) printf("%d", iosize); } @@ -404,7 +404,6 @@ int main(int argc, char *const *argv) memset(&myctx, 0, sizeof(myctx)); io_queue_init(aio_maxio, &myctx); tocopy = howmany(length, aio_blksize); -printf("tocopy=%d len=%d blk=%d\n", tocopy, length, aio_blksize); if (init_iocb(aio_maxio, aio_blksize) < 0) { fprintf(stderr, "Error allocating the i/o buffers\n"); exit(1);