qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow
Date: Fri, 22 Sep 2023 18:44:27 +0100	[thread overview]
Message-ID: <ZQ3SewLmOWsNpY0M@redhat.com> (raw)
In-Reply-To: <20230922163742.149444-1-thuth@redhat.com>

On Fri, Sep 22, 2023 at 06:37:42PM +0200, Thomas Huth wrote:
> When compiling this file with -Wshadow=local , we get:
> 
> ../tests/qtest/m48t59-test.c: In function ‘bcd_check_time’:
> ../tests/qtest/m48t59-test.c:195:17: warning: declaration of ‘s’
>  shadows a previous local [-Wshadow=local]
>   195 |         long t, s;
>       |                 ^
> ../tests/qtest/m48t59-test.c:158:17: note: shadowed declaration is here
>   158 |     QTestState *s = m48t59_qtest_start();
>       |                 ^
> 
> Rename the QTestState variable to "qts" which is the common
> naming for such a variable in other tests.
> 
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/qtest/m48t59-test.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2023-09-22 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 16:37 [PATCH] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow Thomas Huth
2023-09-22 17:44 ` Daniel P. Berrangé [this message]
2023-09-22 18:13 ` Philippe Mathieu-Daudé

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=ZQ3SewLmOWsNpY0M@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).