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/torgzip.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/torgzip.c')
-rw-r--r-- | src/common/torgzip.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c index 331bb5a017..3353f0ef61 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -418,13 +418,13 @@ struct tor_zlib_state_t { * <b>compress</b>, it's for compression; otherwise it's for * decompression. */ tor_zlib_state_t * -tor_zlib_new(int compress, compress_method_t method, +tor_zlib_new(int compress_, compress_method_t method, zlib_compression_level_t compression_level) { tor_zlib_state_t *out; int bits, memlevel; - if (! compress) { + if (! compress_) { /* use this setting for decompression, since we might have the * max number of window bits */ compression_level = HIGH_COMPRESSION; @@ -434,10 +434,10 @@ tor_zlib_new(int compress, compress_method_t method, out->stream.zalloc = Z_NULL; out->stream.zfree = Z_NULL; out->stream.opaque = NULL; - out->compress = compress; + out->compress = compress_; bits = method_bits(method, compression_level); memlevel = get_memlevel(compression_level); - if (compress) { + if (compress_) { if (deflateInit2(&out->stream, Z_BEST_COMPRESSION, Z_DEFLATED, bits, memlevel, Z_DEFAULT_STRATEGY) != Z_OK) @@ -446,7 +446,7 @@ tor_zlib_new(int compress, compress_method_t method, if (inflateInit2(&out->stream, bits) != Z_OK) goto err; // LCOV_EXCL_LINE } - out->allocation = tor_zlib_state_size_precalc(!compress, bits, memlevel); + out->allocation = tor_zlib_state_size_precalc(!compress_, bits, memlevel); total_zlib_allocation += out->allocation; @@ -540,13 +540,13 @@ tor_zlib_free(tor_zlib_state_t *state) /** Return an approximate number of bytes used in RAM to hold a state with * window bits <b>windowBits</b> and compression level 'memlevel' */ static size_t -tor_zlib_state_size_precalc(int inflate, int windowbits, int memlevel) +tor_zlib_state_size_precalc(int inflate_, int windowbits, int memlevel) { windowbits &= 15; #define A_FEW_KILOBYTES 2048 - if (inflate) { + if (inflate_) { /* From zconf.h: "The memory requirements for inflate are (in bytes) 1 << windowBits |