summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-01-12 10:44:22 -0800
committerKeith Packard <keithp@keithp.com>2014-01-22 19:56:32 -0800
commit12ea81792868c10a89a06ce9a9e8f707be283569 (patch)
tree86781143882dbab99cc09edfc3e99db8075bb1e7 /test
parent7104f0f338fa96824a463331d6099a76ee3c21ac (diff)
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>
Diffstat (limited to 'test')
-rw-r--r--test/hashtabletest.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/hashtabletest.c b/test/hashtabletest.c
index 6af14a8e6..ceadfa7a3 100644
--- a/test/hashtabletest.c
+++ b/test/hashtabletest.c
@@ -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);
}