diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-28 10:22:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-28 10:22:10 -0400 |
commit | 9fe6fea1cceb39fc415ad813020bbd863121e0c9 (patch) | |
tree | 0437c4df402c6b7128d67e8c34d981bdd656b400 /src/common/crypto.c | |
parent | 0390e1a60cb91fa581ec568879bf300224db6322 (diff) | |
download | tor-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/common/crypto.c')
-rw-r--r-- | src/common/crypto.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 1c5b5993c9..b87023f071 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -3099,8 +3099,8 @@ crypto_rand_double(void) { /* We just use an unsigned int here; we don't really care about getting * more than 32 bits of resolution */ - unsigned int uint; - crypto_rand((char*)&uint, sizeof(uint)); + unsigned int u; + crypto_rand((char*)&u, sizeof(u)); #if SIZEOF_INT == 4 #define UINT_MAX_AS_DOUBLE 4294967296.0 #elif SIZEOF_INT == 8 @@ -3108,7 +3108,7 @@ crypto_rand_double(void) #else #error SIZEOF_INT is neither 4 nor 8 #endif - return ((double)uint) / UINT_MAX_AS_DOUBLE; + return ((double)u) / UINT_MAX_AS_DOUBLE; } /** Generate and return a new random hostname starting with <b>prefix</b>, |