From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UCkwHy5B2WADAgAAWB0awg (envelope-from ) for ; Sun, 27 Jun 2021 23:25:34 -0400 Received: by simark.ca (Postfix, from userid 112) id 7D3D41F1F2; Sun, 27 Jun 2021 23:25:34 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F0FD91E939 for ; Sun, 27 Jun 2021 23:25:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B12CD3854812 for ; Mon, 28 Jun 2021 03:25:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B12CD3854812 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1624850733; bh=9HDCPvLCxx/V7mm/45T9ipWDMVujmM/yZkCV4Mhuvjg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=aAe+HIWltHsrlj1XtK/avo5aKSzkoHee3ovv9pLWRE7kxiJGpsmZzHv+xiBodnanB iyheEVLj4FdKMocVWSwtyEyg7yjfysMao7m7s83ZinF55wppSEIhmQLwN2xIyD4gIo 3KYqmXX4tpiVUJjNY2xz7N46B93yYWwwyta2IwsM= Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 72DA4383D026 for ; Mon, 28 Jun 2021 03:24:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72DA4383D026 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 69667340806 for ; Mon, 28 Jun 2021 03:24:44 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 3/3] sim: io: add printf attributes to vprintf funcs too Date: Sun, 27 Jun 2021 23:24:39 -0400 Message-Id: <20210628032439.14514-3-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628032439.14514-1-vapier@gentoo.org> References: <20210628032439.14514-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" The compiler can still do basic format checks with vprintf style funcs, so add the printf attribute to these. --- sim/common/sim-io.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sim/common/sim-io.h b/sim/common/sim-io.h index a78e8f59d540..9536e4b587a2 100644 --- a/sim/common/sim-io.h +++ b/sim/common/sim-io.h @@ -65,13 +65,15 @@ void sim_io_printf (SIM_DESC sd, const char *fmt, ...) ATTRIBUTE_PRINTF (2, 3); -void sim_io_vprintf (SIM_DESC sd, const char *fmt, va_list ap); +void sim_io_vprintf (SIM_DESC sd, const char *fmt, va_list ap) + ATTRIBUTE_PRINTF (2, 0); void sim_io_eprintf (SIM_DESC sd, const char *fmt, ...) ATTRIBUTE_PRINTF (2, 3); -void sim_io_evprintf (SIM_DESC sd, const char *fmt, va_list ap); +void sim_io_evprintf (SIM_DESC sd, const char *fmt, va_list ap) + ATTRIBUTE_PRINTF (2, 0); void sim_io_error (SIM_DESC sd, const char *fmt, -- 2.31.1