From: Philippe Mathieu-Daudé Date: Mon, 9 Oct 2023 10:02:43 +0000 (+0200) Subject: tests/throttle: Clean up global variable shadowing X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e9894bc95afba5d5e8422b723fcf7d658cba1fea;p=qmiga%2Fqemu.git tests/throttle: Clean up global variable shadowing Follow all other tests pattern from this file, use the global 'cfg' variable to fix: tests/unit/test-throttle.c:621:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] ThrottleConfig cfg; ^ tests/unit/test-throttle.c:28:23: note: previous declaration is here static ThrottleConfig cfg; ^ Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alberto Garcia Message-ID: <20231009100251.56019-3-philmd@linaro.org> Signed-off-by: Thomas Huth --- diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index ac35d65d19..2146cfacd3 100644 --- a/tests/unit/test-throttle.c +++ b/tests/unit/test-throttle.c @@ -618,7 +618,6 @@ static bool do_test_accounting(bool is_ops, /* are we testing bps or ops */ { THROTTLE_OPS_TOTAL, THROTTLE_OPS_READ, THROTTLE_OPS_WRITE, } }; - ThrottleConfig cfg; BucketType index; int i;