qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests/qtest/m48t59-test: Silence compiler warning with -Wsha


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow
Date: Fri, 22 Sep 2023 20:13:19 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 22/9/23 18:37, 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: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]