Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [pushed] [gdb/contrib] Make cc-with-tweaks.sh shellcheck-clean
Date: Tue, 1 Sep 2026 18:29:03 +0200	[thread overview]
Message-ID: <6327e89f-223a-48bc-bbf1-65cdab61e707@suse.de> (raw)
In-Reply-To: <87cxux7xbk.fsf@tromey.com>

On 9/1/26 6:25 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> Make gdb/contrib/cc-with-tweaks.sh shellcheck-clean by adding some quotes.
> 
> Tom> diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
> Tom> index 57fd51354bc..047c748e165 100755
> Tom> --- a/gdb/contrib/cc-with-tweaks.sh
> Tom> +++ b/gdb/contrib/cc-with-tweaks.sh
> Tom> @@ -335,4 +335,4 @@ if [ "$want_gnu_debuglink" = true ]; then
> Tom>      [ $rc != 0 ] && exit $rc
> Tom>  fi
>   
> Tom> -exit $rc
> Tom> +exit "$rc"
> 
> I wonder why the quotes are needed here but not in the quoted line
> above.

The def that reaches this use is:
...
     rc=${PIPESTATUS[0]}
...
and shellcheck doesn't treat that specially, at least in the context of 
this check.

Thanks,
- Tom

  reply	other threads:[~2026-09-01 16:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  9:11 Tom de Vries
2026-09-01 16:25 ` Tom Tromey
2026-09-01 16:29   ` Tom de Vries [this message]
2026-09-02 19:22     ` Tom de Vries

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=6327e89f-223a-48bc-bbf1-65cdab61e707@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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