mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
test/hashtabletest: Clean up -Wshadow errors
Declare 'XID id' local to each scope it is used in, rather than having the first use be a function-wide declaration. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -26,7 +26,6 @@ static int
|
||||
test1(void)
|
||||
{
|
||||
HashTable h;
|
||||
XID id;
|
||||
int c;
|
||||
int ok = 1;
|
||||
const int numKeys = 420;
|
||||
@@ -36,7 +35,7 @@ test1(void)
|
||||
|
||||
for (c = 0; c < numKeys; ++c) {
|
||||
int *dest;
|
||||
id = c;
|
||||
XID id = c;
|
||||
dest = ht_add(h, &id);
|
||||
if (dest) {
|
||||
*dest = 2 * c;
|
||||
@@ -85,7 +84,6 @@ static int
|
||||
test2(void)
|
||||
{
|
||||
HashTable h;
|
||||
XID id;
|
||||
int c;
|
||||
int ok = 1;
|
||||
const int numKeys = 420;
|
||||
@@ -94,7 +92,7 @@ test2(void)
|
||||
h = ht_create(sizeof(XID), 0, ht_resourceid_hash, ht_resourceid_compare, NULL);
|
||||
|
||||
for (c = 0; c < numKeys; ++c) {
|
||||
id = c;
|
||||
XID id = c;
|
||||
ht_add(h, &id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user