Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Mike Frysinger <vapier@gentoo.org>,
	Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH] sim: add __attribute__((unused)) to <arch>_fill_argbuf_tp function
Date: Thu, 14 Dec 2023 11:21:32 -0500	[thread overview]
Message-ID: <20231214162139.8415-1-simon.marchi@efficios.com> (raw)

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
---
 sim/common/genmloop.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 {

base-commit: f5d420bbceeb1d5065c3d91dd7c6c1e43f855ca1
-- 
2.43.0


             reply	other threads:[~2023-12-14 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 16:21 Simon Marchi [this message]
2023-12-14 21:39 ` Mike Frysinger
2023-12-15  2:32   ` Simon Marchi
2023-12-15  3:46     ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231214162139.8415-1-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox