From nobody Tue May 7 00:45:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1605755530; cv=none; d=zohomail.com; s=zohoarc; b=FTBmkbOHW6wlLkyB+urAJk9Ix65xrvSoh8kIY8LetXVG8PZe9Nx1G0/D656JAZIsICnU/q3EvnbRbRS/3vGBTmgYGrEhUCr+AMhumP0NMBLNt+KEuWRcYIPjwuSVba+yzdYh0L4ZnRYL1ug0MDCZqGCavSWzF+TwhCDx9zfxBjs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605755530; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=eGbxI3U/A6PzWR/VnZ3chmaNtTCCvAOiG+IcomddHR8=; b=NrwgdYB0hBkdUI0YC8cPMVrYXJaXS2ROmyjONdv3djEfz7ixHneJToBKfqicxGRMV1YlNB7H+CCylk3p9t2Q2dc49iSW1GzsLA2EvpoBu29o4GFycesTsze1YYz0pu1KVqRmDG1v2exrIkQd4uRnd/ByXBh2ImohnBfvPDDIn54= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605755530893125.30439420412188; Wed, 18 Nov 2020 19:12:10 -0800 (PST) Received: from localhost ([::1]:48044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfaMj-000722-QB for importer@patchew.org; Wed, 18 Nov 2020 22:12:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfaLQ-00065s-Gb; Wed, 18 Nov 2020 22:10:48 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:2155) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfaLN-0004tH-VF; Wed, 18 Nov 2020 22:10:48 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Cc4S21wBVz6v84; Thu, 19 Nov 2020 11:10:26 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Thu, 19 Nov 2020 11:10:31 +0800 From: Alex Chen To: Subject: [PATCH] hw/display/qxl: Fix bad printf format specifiers Date: Thu, 19 Nov 2020 02:58:51 +0000 Message-ID: <20201119025851.56487-1-alex.chen@huawei.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.35; envelope-from=alex.chen@huawei.com; helo=szxga07-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/18 20:50:45 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.chen@huawei.com, qemu-trivial@nongnu.org, qemu-devel@nongnu.org, zhang.zhanghailiang@huawei.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We should use printf format specifier "%u" instead of "%d" for argument of type "unsigned int". Reported-by: Euler Robot Signed-off-by: Alex Chen --- hw/display/qxl-logger.c | 4 ++-- hw/display/qxl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/display/qxl-logger.c b/hw/display/qxl-logger.c index c15175bce3..68bfa47568 100644 --- a/hw/display/qxl-logger.c +++ b/hw/display/qxl-logger.c @@ -189,7 +189,7 @@ static void qxl_log_cmd_surface(PCIQXLDevice *qxl, QXLS= urfaceCmd *cmd) qxl_name(qxl_surface_cmd, cmd->type), cmd->surface_id); if (cmd->type =3D=3D QXL_SURFACE_CMD_CREATE) { - fprintf(stderr, " size %dx%d stride %d format %s (count %d, max %d= )", + fprintf(stderr, " size %dx%d stride %d format %s (count %u, max %u= )", cmd->u.surface_create.width, cmd->u.surface_create.height, cmd->u.surface_create.stride, @@ -197,7 +197,7 @@ static void qxl_log_cmd_surface(PCIQXLDevice *qxl, QXLS= urfaceCmd *cmd) qxl->guest_surfaces.count, qxl->guest_surfaces.max); } if (cmd->type =3D=3D QXL_SURFACE_CMD_DESTROY) { - fprintf(stderr, " (count %d)", qxl->guest_surfaces.count); + fprintf(stderr, " (count %u)", qxl->guest_surfaces.count); } } =20 diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 431c107096..874bb8ad9e 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -944,7 +944,7 @@ static void interface_async_complete_io(PCIQXLDevice *q= xl, QXLCookie *cookie) qxl_spice_destroy_surface_wait_complete(qxl, cookie->u.surface_id); break; default: - fprintf(stderr, "qxl: %s: unexpected current_async %d\n", __func__, + fprintf(stderr, "qxl: %s: unexpected current_async %u\n", __func__, current_async); } qxl_send_events(qxl, QXL_INTERRUPT_IO_CMD); --=20 2.19.1