summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-28 10:22:10 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-28 10:22:10 -0400
commit9fe6fea1cceb39fc415ad813020bbd863121e0c9 (patch)
tree0437c4df402c6b7128d67e8c34d981bdd656b400 /src/test/test_util.c
parent0390e1a60cb91fa581ec568879bf300224db6322 (diff)
downloadtor-9fe6fea1cceb39fc415ad813020bbd863121e0c9.tar.gz
tor-9fe6fea1cceb39fc415ad813020bbd863121e0c9.zip
Fix a huge pile of -Wshadow warnings.
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 843a57a2a2..5432b2ccc4 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -5240,12 +5240,12 @@ test_util_pwdb(void *arg)
tt_assert(dir != NULL);
/* Try failing cases. First find a user that doesn't exist by name */
- char rand[4];
+ char randbytes[4];
char badname[9];
int i, found=0;
for (i = 0; i < 100; ++i) {
- crypto_rand(rand, sizeof(rand));
- base16_encode(badname, sizeof(badname), rand, sizeof(rand));
+ crypto_rand(randbytes, sizeof(randbytes));
+ base16_encode(badname, sizeof(badname), randbytes, sizeof(randbytes));
if (tor_getpwnam(badname) == NULL) {
found = 1;
break;