Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Andrew Burgess <aburgess@redhat.com>,
	Simon Marchi <simon.marchi@efficios.com>,
	gdb-patches@sourceware.org
Cc: Mike Frysinger <vapier@gentoo.org>
Subject: Re: [PATCH] sim/erc32: fix -Wunused-but-set-global errors
Date: Fri, 20 Nov 2026 21:44:46 -0500	[thread overview]
Message-ID: <5096b7cf-6528-4856-ae10-61797882da55@simark.ca> (raw)
In-Reply-To: <xhuyf7bi7xuwz.fsf@aburgess-thinkpadp1gen8.rmtgb.csb>

On 11/20/26 12:41 PM, Andrew Burgess wrote:
> Simon Marchi <simon.marchi@efficios.com> writes:
> 
>> Building the erc32 simulator with a recent clang fails with:
>>
>>     /home/smarchi/src/binutils-gdb/sim/erc32/erc32.c:159:19: error: variable 'mec_icr' set but not used [-Werror,-Wunused-but-set-global]
>>     /home/smarchi/src/binutils-gdb/sim/erc32/erc32.c:165:19: error: variable 'posted_irq' set but not used [-Werror,-Wunused-but-set-global]
>>     /home/smarchi/src/binutils-gdb/sim/erc32/erc32.c:247:19: error: variable 'uarta_data' set but not used [-Werror,-Wunused-but-set-global]
>>
>> mec_icr and posted_irq are only ever set to 0 in mec_reset.  Remove
>> them.
>>
>> uarta_data and uartb_data are only read when FAST_UART is not defined,
>> but the simulator is build with FAST_UART by default.  Mark them
>> ATTRIBUTE_UNUSED, like functions uart_rx, uarta_tx and uartb_tx, which
>> are in the same situation.
> 
> All seems reasonable to me.
> 
> Approved-By: Andrew Burgess <aburgess@redhat.com>
> 
> Thanks,
> Andrew

Thanks, pushed.

Simon

      reply	other threads:[~2026-11-21  2:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 15:01 Simon Marchi
2026-11-20 17:41 ` Andrew Burgess
2026-11-21  2:44   ` Simon Marchi [this message]

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=5096b7cf-6528-4856-ae10-61797882da55@simark.ca \
    --to=simark@simark.ca \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --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