From patchwork Tue Apr 11 21:29:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 9676103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1BDE060231 for ; Tue, 11 Apr 2017 21:30:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11EF828562 for ; Tue, 11 Apr 2017 21:30:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0527B28569; Tue, 11 Apr 2017 21:30:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA09A28562 for ; Tue, 11 Apr 2017 21:30:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cy3MN-0007aD-V2; Tue, 11 Apr 2017 21:29:59 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cy3MM-0007a6-S8 for v9fs-developer@lists.sourceforge.net; Tue, 11 Apr 2017 21:29:58 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1cy3MJ-0005cq-I9 for v9fs-developer@lists.sourceforge.net; Tue, 11 Apr 2017 21:29:58 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1cy3M3-0007s3-4l; Tue, 11 Apr 2017 21:29:39 +0000 From: Colin King To: Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , "David S . Miller" , v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org Date: Tue, 11 Apr 2017 22:29:38 +0100 Message-Id: <20170411212938.5901-1-colin.king@canonical.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Headers-End: 1cy3MJ-0005cq-I9 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [V9fs-developer] [PATCH] xen/9pfs: use %d format specifier instead of %u for a signed int X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King variable i is a signed int, so use the %d print format specifier instead of %u. Fixes two warnings by cppcheck. Signed-off-by: Colin Ian King --- net/9p/trans_xen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index 47864245c0d4..9b66087bbc91 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -441,13 +441,13 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev, char str[16]; BUILD_BUG_ON(XEN_9PFS_NUM_RINGS > 9); - sprintf(str, "ring-ref%u", i); + sprintf(str, "ring-ref%d", i); ret = xenbus_printf(xbt, dev->nodename, str, "%d", priv->rings[i].ref); if (ret) goto error_xenbus; - sprintf(str, "event-channel-%u", i); + sprintf(str, "event-channel-%d", i); ret = xenbus_printf(xbt, dev->nodename, str, "%u", priv->rings[i].evtchn); if (ret)