Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kfxEk-0001cZ-8a for mharc-qemu-trivial@gnu.org; Thu, 19 Nov 2020 22:37:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfxEh-0001c0-JY; Thu, 19 Nov 2020 22:37:23 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfxEe-0006ux-Vv; Thu, 19 Nov 2020 22:37:23 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Ccj050J3gzhZrl; Fri, 20 Nov 2020 11:36:53 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Fri, 20 Nov 2020 11:37:02 +0800 From: Alex Chen To: , , CC: , , , , Subject: [PATCH v2 1/2] display/vmware_vga: Fix bad printf format specifiers Date: Fri, 20 Nov 2020 03:25:16 +0000 Message-ID: <20201120032517.104486-2-alex.chen@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20201120032517.104486-1-alex.chen@huawei.com> References: <20201120032517.104486-1-alex.chen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.191; envelope-from=alex.chen@huawei.com; helo=szxga05-in.huawei.com 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2020 03:37:23 -0000 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 Reviewed-by: Philippe Mathieu-Daudé --- hw/display/vmware_vga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index bef0d7d69a..f93bbe15c2 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -534,7 +534,7 @@ static inline void vmsvga_cursor_define(struct vmsvga_state_s *s, #endif break; default: - fprintf(stderr, "%s: unhandled bpp %d, using fallback cursor\n", + fprintf(stderr, "%s: unhandled bpp %u, using fallback cursor\n", __func__, c->bpp); cursor_put(qc); qc = cursor_builtin_left_ptr(); -- 2.19.1