Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH 09/18] sim/bpf: remove unused bpf_program_section variable
Date: Mon, 19 Oct 2026 15:35:45 -0400	[thread overview]
Message-ID: <d7deeb1b-f509-48fb-ba06-4d538b06b87f@efficios.com> (raw)
In-Reply-To: <20261019193231.1708375-10-simon.marchi@efficios.com>

Adding gdb-patches@.

On 10/19/26 3:28 PM, Simon Marchi wrote:
> Building the BPF simulator with a recent clang fails with:
> 
>     /home/smarchi/src/binutils-gdb/sim/bpf/bpf-sim.c:367:14: error: variable 'bpf_program_section' set but not used [-Werror,-Wunused-but-set-global]
> 
> The --bpf-set-program option stores its argument in this variable, but
> nothing ever reads it, the feature was never implemented.  Remove the
> variable.
> 
> Change-Id: I71edbed055a82fb65a2acecbc38477e3ded80d6a
> ---
>  sim/bpf/bpf-sim.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/sim/bpf/bpf-sim.c b/sim/bpf/bpf-sim.c
> index 9cb272a240e5..34f78c91bc30 100644
> --- a/sim/bpf/bpf-sim.c
> +++ b/sim/bpf/bpf-sim.c
> @@ -362,10 +362,6 @@ bpf_pc_set (sim_cpu *cpu, sim_cia pc)
>  
>  static int64_t skb_data_offset;
>  
> -/* String with the name of the section containing the BPF program to
> -   run.  */
> -static char *bpf_program_section = NULL;
> -
>  \f
>  /***** Handle BPF-specific command line options.  *****/
>  
> @@ -416,7 +412,6 @@ bpf_option_handler (SIM_DESC sd, sim_cpu *cpu ATTRIBUTE_UNUSED, int opt,
>      case OPTION_BPF_SET_PROGRAM:
>        /* XXX: check that the section exists and tell the user about a
>           new start_address.  */
> -      bpf_program_section = xstrdup (arg);
>        break;
>  
>      case OPTION_BPF_SKB_DATA_OFFSET:
> -- 
> 2.56.0
> 

       reply	other threads:[~2026-10-19 19:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261019193231.1708375-1-simon.marchi@efficios.com>
     [not found] ` <20261019193231.1708375-10-simon.marchi@efficios.com>
2026-10-19 19:35   ` Simon Marchi [this message]
2026-10-20 10:59     ` Jose E. Marchesi
2026-10-21 13:30       ` Simon Marchi
     [not found] ` <20261019193231.1708375-11-simon.marchi@efficios.com>
2026-10-19 19:36   ` [PATCH 10/18] sim/erc32: fix -Wunused-but-set-global errors Simon Marchi
     [not found] ` <20261019193231.1708375-12-simon.marchi@efficios.com>
2026-10-19 19:36   ` [PATCH 11/18] sim/m68hc11: remove unused current_insn_size variable Simon Marchi

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=d7deeb1b-f509-48fb-ba06-4d538b06b87f@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.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