From nobody Mon Apr 29 00:08:11 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; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1667644920; cv=none; d=zohomail.com; s=zohoarc; b=EfLXQZEsw4cdU2is4GKgoL502PR5Y2qtPfU2BPVn9ucmeCkfxuRLYaEhVbBJmyQXGH0mq7lh5PHtO9z3aEb1jsmK3bAvy1pjzW7E0o7V1oNCSaRpeUC5l0ZFO7fYgry9yeY9AUisVIakGC/vi0pIBL9mJpRshXNKzHxZEU0V7Qs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667644920; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=//+nuiAMdloe4XriBTHqXiG1yBqw1xV0nZW3/5Lz5lI=; b=cQTgTbXSkWDq9Lzyr2CpX5Zqmbel7KsS4xp768YYPsxmB10mhcOi9Jh8yfDyV2gKgheTaaFaE/Q5mZBeuwMAHbWScdD4ZJ/0JKrqTA6pB+QCuWjkpN1w89BfQdJ/ZjOzLicn+tIJWkrQxrx2jsDtzX4u0krVTb0B42zGufD5Ck4= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667644920792341.04617650726857; Sat, 5 Nov 2022 03:42:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orGc8-0004VV-Vk; Sat, 05 Nov 2022 06:41:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orGc5-0004TY-7w; Sat, 05 Nov 2022 06:41:21 -0400 Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orGbq-00036f-2i; Sat, 05 Nov 2022 06:41:20 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.mail.uni-mannheim.de (Postfix) with ESMTP id CE3C8100CBB; Sat, 5 Nov 2022 11:25:16 +0100 (CET) Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]) by localhost (mail-r83.rz.uni-mannheim.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HqtemuOWmXpp; Sat, 5 Nov 2022 11:25:16 +0100 (CET) Received: from bss11.bib.uni-mannheim.de (unknown [IPv6:2001:7c0:2900:8024::869b:24a1]) by smtp.mail.uni-mannheim.de (Postfix) with ESMTPS id ADCDC100C07; Sat, 5 Nov 2022 11:25:16 +0100 (CET) Received: from stweil by bss11.bib.uni-mannheim.de with local (Exim 4.94.2) (envelope-from ) id 1orGMW-001pbx-Dv; Sat, 05 Nov 2022 11:25:16 +0100 X-Virus-Scanned: amavisd-new at uni-mannheim.de To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 1/4] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM) Date: Sat, 5 Nov 2022 11:24:45 +0100 Message-Id: <20221105102448.436469-2-sw@weilnetz.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221105102448.436469-1-sw@weilnetz.de> References: <20221105102448.436469-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: none client-ip=134.155.96.80; envelope-from=stweil@bss11.bib.uni-mannheim.de; helo=smtp.mail.uni-mannheim.de X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_NONE=0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1667644921800100003 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Stefan Weil Message-Id: <20220422070144.1043697-2-sw@weilnetz.de> Signed-off-by: Laurent Vivier --- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index ffed4729a3..d9a6e3e556 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -651,7 +651,7 @@ generate_faults(VuDev *dev) { =20 if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, ®_struct)) { vu_panic(dev, "%s: Failed to userfault region %d " - "@%p + size:%zx offset: %zx: (ufd=3D%d)%s\n", + "@%" PRIx64 " + size:%zx offset: %zx: (ufd=3D%d)= %s\n", __func__, i, dev_region->mmap_addr, dev_region->size, dev_region->mmap_offset, --=20 2.30.2 From nobody Mon Apr 29 00:08:11 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; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1667644985; cv=none; d=zohomail.com; s=zohoarc; b=j9zyRYo55lnlQU7LrO0x+JqBrte9vSstISHY5wsSGSb5FxXji43Iy1Xb3fRvpG+sNAs/nJLI+O0ZZAnGQg4E59JEUhYxFmMCl2ojD7t9ESyXQOShd7W0xuK7OrLk/S3iMUPV8eYohWhnSQd3PeH3kHDWuhdiKH+LA0cQndZ08Ks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667644985; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=IrIoJG+PgVw59ya77T1mpWu2HPrDA4Y7XBscnE775iE=; b=U+X8KvCWRLX3ckxTR3vRVdIEaUUNjswPTCM+MSt7srZEzomDgMZETy9TB1fP0e4PTyDEjBffp+eYaS3p58PiZ4ZU//mHY4Cn7BhtuYqx8+uvtBG21AtmnDIDIxuasZ7R8sodK9TqvxPdJhmczytZoK3Bq0NxODlq4tLO3hO7kZk= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667644985484247.4416097449805; Sat, 5 Nov 2022 03:43:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orGcA-0004Wi-RT; Sat, 05 Nov 2022 06:41:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orGc6-0004UH-M3; Sat, 05 Nov 2022 06:41:22 -0400 Received: from smtp.mail.uni-mannheim.de ([2001:7c0:2900:60::869b:6050]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orGbq-00036e-3r; Sat, 05 Nov 2022 06:41:22 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.mail.uni-mannheim.de (Postfix) with ESMTP id 21660100CC8; Sat, 5 Nov 2022 11:25:18 +0100 (CET) Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]) by localhost (mail-r83.rz.uni-mannheim.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KV6MsMqeQAwz; Sat, 5 Nov 2022 11:25:18 +0100 (CET) Received: from bss11.bib.uni-mannheim.de (unknown [IPv6:2001:7c0:2900:8024::869b:24a1]) by smtp.mail.uni-mannheim.de (Postfix) with ESMTPS id 02D0F100C07; Sat, 5 Nov 2022 11:25:18 +0100 (CET) Received: from stweil by bss11.bib.uni-mannheim.de with local (Exim 4.94.2) (envelope-from ) id 1orGMX-001pc1-Mx; Sat, 05 Nov 2022 11:25:17 +0100 X-Virus-Scanned: amavisd-new at uni-mannheim.de To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v2 2/4] libvhost-user: Fix format strings Date: Sat, 5 Nov 2022 11:24:46 +0100 Message-Id: <20221105102448.436469-3-sw@weilnetz.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221105102448.436469-1-sw@weilnetz.de> References: <20221105102448.436469-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: none client-ip=2001:7c0:2900:60::869b:6050; envelope-from=stweil@bss11.bib.uni-mannheim.de; helo=smtp.mail.uni-mannheim.de X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1667644985715100003 Signed-off-by: Stefan Weil Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20220422070144.1043697-3-sw@weilnetz.de> Signed-off-by: Laurent Vivier --- subprojects/libvhost-user/libvhost-user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index d9a6e3e556..d67953a1c3 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -700,7 +700,7 @@ vu_add_mem_reg(VuDev *dev, VhostUserMsg *vmsg) { if (vmsg->size < VHOST_USER_MEM_REG_SIZE) { close(vmsg->fds[0]); vu_panic(dev, "VHOST_USER_ADD_MEM_REG requires a message size of a= t " - "least %d bytes and only %d bytes were received", + "least %zu bytes and only %d bytes were received", VHOST_USER_MEM_REG_SIZE, vmsg->size); return false; } @@ -826,7 +826,7 @@ vu_rem_mem_reg(VuDev *dev, VhostUserMsg *vmsg) { if (vmsg->size < VHOST_USER_MEM_REG_SIZE) { vmsg_close_fds(vmsg); vu_panic(dev, "VHOST_USER_REM_MEM_REG requires a message size of a= t " - "least %d bytes and only %d bytes were received", + "least %zu bytes and only %d bytes were received", VHOST_USER_MEM_REG_SIZE, vmsg->size); return false; } --=20 2.30.2 From nobody Mon Apr 29 00:08:11 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; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1667644962; cv=none; d=zohomail.com; s=zohoarc; b=IgSVvGkqHwGxZdsUUqHb2glVctS0NRPHpAZG4bopTdflfj8MoU/sRLm/sxAQS7S9oWFYcpq+cFybZkZqCYwbYkLgyt8NySbxYshFwpppY2B+w56BnAUKiP/dZGTSJyGDcU9+Zom43OI1SoZ7v25srr6KlwQmk0W0YGil1PUuoq0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667644962; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=xRC26wD85YyJifUVX1vj5PZMO0HPe8x/Y4+qnr6vqJE=; b=XfLdc5hhsxdbRY+MfLOhsUsTF3hDbszf+b5Y/Ktxpxcs2HiBThgLZhnS1nmDih0SmobWO11cgBX/yJYfAQ3S6R+Tdge7IuZjQRR6RepZDj9qws8+OC5l16rDQPz0sbgCkz6PmB+0OtPlcsh0J0j8HdGNL2RY3Lmq306lK+s6gCU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667644962162288.9279003987846; Sat, 5 Nov 2022 03:42:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orGc9-0004W7-IA; Sat, 05 Nov 2022 06:41:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orGc6-0004UE-KX; Sat, 05 Nov 2022 06:41:22 -0400 Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orGbq-00036g-3l; Sat, 05 Nov 2022 06:41:22 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.mail.uni-mannheim.de (Postfix) with ESMTP id 1750A100CEE; Sat, 5 Nov 2022 11:25:19 +0100 (CET) Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]) by localhost (mail-r83.rz.uni-mannheim.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vwk6p0GHZo8h; Sat, 5 Nov 2022 11:25:19 +0100 (CET) Received: from bss11.bib.uni-mannheim.de (unknown [IPv6:2001:7c0:2900:8024::869b:24a1]) by smtp.mail.uni-mannheim.de (Postfix) with ESMTPS id F2448100C07; Sat, 5 Nov 2022 11:25:18 +0100 (CET) Received: from stweil by bss11.bib.uni-mannheim.de with local (Exim 4.94.2) (envelope-from ) id 1orGMY-001pc7-NC; Sat, 05 Nov 2022 11:25:18 +0100 X-Virus-Scanned: amavisd-new at uni-mannheim.de To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil Subject: [PATCH v2 3/4] libvhost-user: Fix two more format strings Date: Sat, 5 Nov 2022 11:24:47 +0100 Message-Id: <20221105102448.436469-4-sw@weilnetz.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221105102448.436469-1-sw@weilnetz.de> References: <20221105102448.436469-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: none client-ip=134.155.96.80; envelope-from=stweil@bss11.bib.uni-mannheim.de; helo=smtp.mail.uni-mannheim.de X-Spam_score_int: -38 X-Spam_score: -3.9 X-Spam_bar: --- X-Spam_report: (-3.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1667644963521100003 Content-Type: text/plain; charset="utf-8" This fix is required for 32 bit host. The bug was detected by CI for arm-linux, but is also relevant for i386-linux. Reported-by: Stefan Hajnoczi Signed-off-by: Stefan Weil --- subprojects/libvhost-user/libvhost-user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index d67953a1c3..80f9952e71 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -651,7 +651,8 @@ generate_faults(VuDev *dev) { =20 if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, ®_struct)) { vu_panic(dev, "%s: Failed to userfault region %d " - "@%" PRIx64 " + size:%zx offset: %zx: (ufd=3D%d)= %s\n", + "@%" PRIx64 " + size:%" PRIx64 " offset: %" PRIx= 64 + ": (ufd=3D%d)%s\n", __func__, i, dev_region->mmap_addr, dev_region->size, dev_region->mmap_offset, --=20 2.30.2 From nobody Mon Apr 29 00:08:11 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; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1667644956; cv=none; d=zohomail.com; s=zohoarc; b=S9H+YRlcnjj+fPd4DK2TVxo/GI3oq9hquntvVOmzOh4SDrIGPOcrwTkQn4riBcNhxyJ+ooUIRJkot7Cd8/9cyRY19hv9Fd1Kt1PFd2kdwzISEqzMiAYigKTlghNmyAV7cKjlJrdK1rqsqJzIJxtMSZUAgbL/x7KlwSGtqAGeJaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667644956; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=QOJAs1NoHMLytse0stHyU/nhow4mgt0u1OlUzOx5A+E=; b=TZFxWSiMacUepBArikNT2shA8CoQ5PLQKo2FFf0WlGtuHPSHiYeenHUYc3KUMpg1+lr4O12oUTcgKyFNz0QP/uDtpItCTtjMq6mt+pnFoCom7L5Sqm+oKR9O2Xouwt2qgkO6R+xc1vIhRb71cenkT3/S2IWQuzTec4x2f6tn1VU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166764495656286.33590414184516; Sat, 5 Nov 2022 03:42:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orGc6-0004UF-Uh; Sat, 05 Nov 2022 06:41:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orGc5-0004Tb-I4; Sat, 05 Nov 2022 06:41:21 -0400 Received: from smtp.mail.uni-mannheim.de ([2001:7c0:2900:60::869b:6050]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orGbq-00036i-3t; Sat, 05 Nov 2022 06:41:21 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.mail.uni-mannheim.de (Postfix) with ESMTP id 0711C100CFE; Sat, 5 Nov 2022 11:25:20 +0100 (CET) Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]) by localhost (mail-r83.rz.uni-mannheim.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g6E-RqwaLwB3; Sat, 5 Nov 2022 11:25:19 +0100 (CET) Received: from bss11.bib.uni-mannheim.de (unknown [IPv6:2001:7c0:2900:8024::869b:24a1]) by smtp.mail.uni-mannheim.de (Postfix) with ESMTPS id DFDED100C07; Sat, 5 Nov 2022 11:25:19 +0100 (CET) Received: from stweil by bss11.bib.uni-mannheim.de with local (Exim 4.94.2) (envelope-from ) id 1orGMZ-001pcB-Kh; Sat, 05 Nov 2022 11:25:19 +0100 X-Virus-Scanned: amavisd-new at uni-mannheim.de To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v2 4/4] libvhost-user: Add format attribute to local function vu_panic Date: Sat, 5 Nov 2022 11:24:48 +0100 Message-Id: <20221105102448.436469-5-sw@weilnetz.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221105102448.436469-1-sw@weilnetz.de> References: <20221105102448.436469-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: none client-ip=2001:7c0:2900:60::869b:6050; envelope-from=stweil@bss11.bib.uni-mannheim.de; helo=smtp.mail.uni-mannheim.de X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_NONE=0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1667644957516100001 Signed-off-by: Stefan Weil Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20220422070144.1043697-4-sw@weilnetz.de> Signed-off-by: Laurent Vivier --- subprojects/libvhost-user/libvhost-user.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index 80f9952e71..d6ee6e7d91 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -45,6 +45,17 @@ #include "libvhost-user.h" =20 /* usually provided by GLib */ +#if __GNUC__ > 2 || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ > 4) +#if !defined(__clang__) && (__GNUC__ =3D=3D 4 && __GNUC_MINOR__ =3D=3D 4) +#define G_GNUC_PRINTF(format_idx, arg_idx) \ + __attribute__((__format__(gnu_printf, format_idx, arg_idx))) +#else +#define G_GNUC_PRINTF(format_idx, arg_idx) \ + __attribute__((__format__(__printf__, format_idx, arg_idx))) +#endif +#else /* !__GNUC__ */ +#define G_GNUC_PRINTF(format_idx, arg_idx) +#endif /* !__GNUC__ */ #ifndef MIN #define MIN(x, y) ({ \ typeof(x) _min1 =3D (x); \ @@ -151,7 +162,7 @@ vu_request_to_string(unsigned int req) } } =20 -static void +static void G_GNUC_PRINTF(2, 3) vu_panic(VuDev *dev, const char *msg, ...) { char *buf =3D NULL; --=20 2.30.2