From patchwork Sat Oct 6 18:38:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 10629289 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B12D15E8 for ; Sat, 6 Oct 2018 18:40:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 091E1290DC for ; Sat, 6 Oct 2018 18:40:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECF51290DF; Sat, 6 Oct 2018 18:40:32 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 10D15290DC for ; Sat, 6 Oct 2018 18:40:31 +0000 (UTC) Received: from localhost ([::1]:40089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8rV8-0001Oq-VN for patchwork-qemu-devel@patchwork.kernel.org; Sat, 06 Oct 2018 14:40:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8rUJ-0000uu-Sr for qemu-devel@nongnu.org; Sat, 06 Oct 2018 14:39:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8rUG-0004bu-C2 for qemu-devel@nongnu.org; Sat, 06 Oct 2018 14:39:38 -0400 Received: from mail.weilnetz.de ([37.120.169.71]:37928 helo=v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g8rU4-0004Mi-HD; Sat, 06 Oct 2018 14:39:26 -0400 Received: from localhost (localhost [127.0.0.1]) by v2201612906741603.powersrv.de (Postfix) with ESMTP id 9A802DAFFC6; Sat, 6 Oct 2018 20:39:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at v2201612906741603.powersrv.de Received: from v2201612906741603.powersrv.de ([127.0.0.1]) by localhost (v2201612906741603.powersrv.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u05a-I-Hx594; Sat, 6 Oct 2018 20:39:17 +0200 (CEST) Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by v2201612906741603.powersrv.de (Postfix) with ESMTP id 33948DAFF8A; Sat, 6 Oct 2018 20:39:17 +0200 (CEST) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id CE6024606D3; Sat, 6 Oct 2018 20:39:16 +0200 (CEST) From: Stefan Weil To: QEMU Developer Date: Sat, 6 Oct 2018 20:38:51 +0200 Message-Id: <20181006183851.3797-1-sw@weilnetz.de> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 37.120.169.71 Subject: [Qemu-devel] [PATCH] qemu-io-cmds: Fix two format strings X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Trivial , Kevin Wolf , Stefan Weil , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use %zu instead of %zd for unsigned numbers. This fixes two error messages from the LSTM static code analyzer: This argument should be of type 'ssize_t' but is of type 'unsigned long' Signed-off-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé --- qemu-io-cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index db0b3ee5ef..5363482213 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -907,7 +907,7 @@ static int readv_f(BlockBackend *blk, int argc, char **argv) memset(cmp_buf, pattern, qiov.size); if (memcmp(buf, cmp_buf, qiov.size)) { printf("Pattern verification failed at offset %" - PRId64 ", %zd bytes\n", offset, qiov.size); + PRId64 ", %zu bytes\n", offset, qiov.size); ret = -EINVAL; } g_free(cmp_buf); @@ -1294,7 +1294,7 @@ static void aio_read_done(void *opaque, int ret) memset(cmp_buf, ctx->pattern, ctx->qiov.size); if (memcmp(ctx->buf, cmp_buf, ctx->qiov.size)) { printf("Pattern verification failed at offset %" - PRId64 ", %zd bytes\n", ctx->offset, ctx->qiov.size); + PRId64 ", %zu bytes\n", ctx->offset, ctx->qiov.size); } g_free(cmp_buf); }