From nobody Mon Feb 9 22:38:48 2026 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=1669476414; cv=none; d=zohomail.com; s=zohoarc; b=Iiz2RxAxo0F3mpWynHpvh+eYJ5HPlAusoEVaZlRUJwC+KhyNnzw/XYkcsvpKuDrCOK0ayKCdSLh6UMOSWL30TNcGWnNwhCM5dHAtte1Ns4iGw8Wh0XjPQ0iqwqZGaLmTUwU7da70l4Ed1UpENVI/CvdmEhDRi8zhSTBmk5REGg0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669476414; 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=kl+Qah+e4JUPojJvVP/uVn9grHLi1R+75IJ+Ik7WQkA=; b=Wfc8tPZirRBnQWyuqil3wYtq6gfOFycYyLzUepRU5n+ZjCIU/O4PV49lD71IwWCcY4COaK6msFW5XBtQqNCRQuWqRZbAnaULlQH/uANgnMqWrPUlaA0X/QnIUNYD7KgNUVyhs9VRhaSlHPJ8gPTiJ9xFUxCA49vgNQc7RtfXsOU= 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 1669476414118306.54875935608527; Sat, 26 Nov 2022 07:26:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyx3x-0008Sk-H2; Sat, 26 Nov 2022 10:25:53 -0500 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 1oyx3v-0008PG-8J for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:51 -0500 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyx3t-0006uj-QJ for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:51 -0500 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id B131BDA1049; Sat, 26 Nov 2022 16:25:48 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id AE0A746000E; Sat, 26 Nov 2022 16:25:48 +0100 (CET) To: qemu-devel@nongnu.org, "Michael S . Tsirkin" Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 for-7.2 4/6] libvhost-user: Add format attribute to local function vu_panic Date: Sat, 26 Nov 2022 16:25:05 +0100 Message-Id: <20221126152507.283271-5-sw@weilnetz.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221126152507.283271-1-sw@weilnetz.de> References: <20221126152507.283271-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: pass client-ip=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1669476414799100001 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.35.1