[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/10] tests/throttle: Clean up global variable shadowing
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 02/10] tests/throttle: Clean up global variable shadowing |
Date: |
Mon, 9 Oct 2023 12:02:43 +0200 |
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é <philmd@linaro.org>
---
tests/unit/test-throttle.c | 1 -
1 file changed, 1 deletion(-)
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;
--
2.41.0
- [PATCH 00/10] tests: Clean up global variables shadowing, Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 01/10] system/qtest: Clean up global variable shadowing in qtest_server_init(), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 02/10] tests/throttle: Clean up global variable shadowing,
Philippe Mathieu-Daudé <=
- [PATCH 03/10] tests/virtio-scsi: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 04/10] tests/cdrom-test: Clean up global variable shadowing in prepare_image(), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 07/10] tests/npcm7xx_adc: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 06/10] tests/rtl8139: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/09