summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2023-09-22 12:57:42 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-09-29 10:07:18 +0200
commitd8573092a49b3133530ceee35846a54e600f8a73 (patch)
treee15040740c985770245644fc36e4d79957179584
parent8cf52ff5c727519791eb897410f31c4ad27300cc (diff)
downloadfocaccia-qemu-d8573092a49b3133530ceee35846a54e600f8a73.tar.gz
focaccia-qemu-d8573092a49b3133530ceee35846a54e600f8a73.zip
test-throttle: don't shadow 'index' variable in do_test_accounting()
Fixes build with -Wshadow=local

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-ID: <20230922105742.81317-1-berto@igalia.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--tests/unit/test-throttle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c
index cb587e33e7..ac35d65d19 100644
--- a/tests/unit/test-throttle.c
+++ b/tests/unit/test-throttle.c
@@ -625,7 +625,7 @@ static bool do_test_accounting(bool is_ops, /* are we testing bps or ops */
     throttle_config_init(&cfg);
 
     for (i = 0; i < 3; i++) {
-        BucketType index = to_test[is_ops][i];
+        index = to_test[is_ops][i];
         cfg.buckets[index].avg = avg;
     }