From patchwork Thu Dec 14 16:21:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 82155 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B367F3860776 for ; Thu, 14 Dec 2023 16:21:56 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 056F3385803B for ; Thu, 14 Dec 2023 16:21:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 056F3385803B Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 056F3385803B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702570904; cv=none; b=VnOZMwOoJGIWjci2llwD8/boTBQvelDrRA25VYzD8KTlC+PCdAtD2PI9jXFoVCH+kUYfY2FyqUrv84F+oghl+jzbMeJdZKjzaL5nCU8EvND1djTaqobjcYlicEqIILbxuU0EBMJVmYr8TQfsHB5DGWak8SjWtkxnixIoYYtTU5Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702570904; c=relaxed/simple; bh=DbXR5nXy2y53YKljyvORgxeKKLJ53gCEeWZB3b7Kc0c=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=UaNSGj+pDqexyQ28hCTvRlfMTOXlGhGoCSgamWr/LZyYdzt8SP17BipSjYcGb8nVQ8KshFfJmVKUMTfJUX8Rg0kXZUOUH4WGKUhYRxJ6sfMlAHKPiBwW1u8ZFlIkmTxjPNXmym6J+oVC2tQWTC7duyCHefhw9jPHAdfDjorrHeY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smarchi-efficios.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 6391D1E0AC; Thu, 14 Dec 2023 11:21:41 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Mike Frysinger , Simon Marchi Subject: [PATCH] sim: add __attribute__((unused)) to _fill_argbuf_tp function Date: Thu, 14 Dec 2023 11:21:32 -0500 Message-ID: <20231214162139.8415-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3496.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org I get this when building with --enable-targets=all: CC m32r/mloopx.o m32r/mloopx.c:37:1: error: ‘m32rxf_fill_argbuf_tp’ defined but not used [-Werror=unused-function] 37 | m32rxf_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf, | ^~~~~~~~~~~~~~~~~~~~~ CC m32r/mloop2.o m32r/mloop2.c:37:1: error: ‘m32r2f_fill_argbuf_tp’ defined but not used [-Werror=unused-function] 37 | m32r2f_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf, | ^~~~~~~~~~~~~~~~~~~~~ I don't know this code, so I didn't do an in-depth analysis of the situation. Adding the __attribute__((unused)) makes the warning go away (this is what this patch does), but perhaps there's a better way or the warning is the sign that something is wrong. Change-Id: I5ef46b3dd790d6adf7c752ad5ba9676d4a41e043 Tested-By: Simon Marchi Reported-by: Simon Marchi --- sim/common/genmloop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: f5d420bbceeb1d5065c3d91dd7c6c1e43f855ca1 diff --git a/sim/common/genmloop.sh b/sim/common/genmloop.sh index 4312dc5468f6..b466823331b5 100755 --- a/sim/common/genmloop.sh +++ b/sim/common/genmloop.sh @@ -336,7 +336,7 @@ static INLINE void /* Fill in tracing/profiling fields of an ARGBUF. */ -static INLINE void +__attribute__((unused)) static INLINE void @prefix@_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf, int trace_p, int profile_p) {