qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] configure: Remove spurious [] from tr
Date: Thu, 12 Aug 2021 14:05:36 +0100	[thread overview]
Message-ID: <YRUcoAiKWtxfPVqB@work-vm> (raw)
In-Reply-To: <CAFEAcA9dp-kM_cB9g=7kpeCbFVxiwoQ14L+mymc_pHwZ_1UDnA@mail.gmail.com>

* Peter Maydell (peter.maydell@linaro.org) wrote:
> On Thu, 12 Aug 2021 at 12:11, Dr. David Alan Gilbert (git)
> <dgilbert@redhat.com> wrote:
> >
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> >
> > ShellCheck points out that tr '[a-z]' actually replaces the []'s
> > and only the a-z is needed.
> >
> > Remove the spurious [] - although in this use it will make no
> > difference.
> >
> > Fixes: bb55b712e8dc4d4eb515144d5c26798fea178cba
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> >  configure | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index 9a79a004d7..5bb8c2a59d 100755
> > --- a/configure
> > +++ b/configure
> > @@ -4549,7 +4549,7 @@ if test "$gprof" = "yes" ; then
> >  fi
> >  echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak
> >  for drv in $audio_drv_list; do
> > -    def=CONFIG_AUDIO_$(echo $drv | LC_ALL=C tr '[a-z]' '[A-Z]')
> > +    def=CONFIG_AUDIO_$(echo $drv | LC_ALL=C tr 'a-z' 'A-Z')
> >      echo "$def=y" >> $config_host_mak
> >  done
> >  if test "$alsa" = "yes" ; then
> > -
> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

Thanks.

> (Is this the only thing shellcheck complains about in configure?
> I'm guessing not...)

Indeed it's not; there's LOTS of warnings; although most of them are
probably irrelevant; there are also two others at the error level:

In configure line 4406:
        if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
                                                       ^-- SC1087: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).

which is probably just needing the ${emu} to shut it up.

In configure line 4464:
if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
    ^-- SC1035: You are missing a required space after the !.

which hmm I've not quite got my head around yet; but maybe that one is
real.


  https://www.shellcheck.net/wiki/SC1035 -- You are missing a required space ...
  https://www.shellcheck.net/wiki/SC1087 -- Use braces when expanding arrays,...

Dave

> thanks
> -- PMM
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



  reply	other threads:[~2021-08-12 13:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 11:09 [PATCH] configure: Remove spurious [] from tr Dr. David Alan Gilbert (git)
2021-08-12 11:58 ` Peter Maydell
2021-08-12 13:05   ` Dr. David Alan Gilbert [this message]
2021-08-12 13:54     ` Eric Blake
2021-08-12 17:51     ` Paolo Bonzini
2021-08-12 17:49 ` Paolo Bonzini
2021-08-12 17:54   ` Dr. David Alan Gilbert

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=YRUcoAiKWtxfPVqB@work-vm \
    --to=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).