Commit e7256a8a authored by Jim Meyering's avatar Jim Meyering Committed by Facebook Github Bot

folly/io/Compression.cpp: avoid shadowing warnings for "rc"

Summary:
gcc's -Wshadow (and the under-review -Wshadow-local) would evoke this:
```
folly/io/Compression.cpp:650:9: error: declaration of 'rc' shadows a previous local [-Werror=shadow-compatible-local]
folly/io/Compression.cpp:637:7: error: shadowed declaration is here [-Werror=shadow-compatible-local]
folly/io/Compression.cpp:566:9: error: declaration of 'rc' shadows a previous local [-Werror=shadow-compatible-local]
folly/io/Compression.cpp:548:7: error: shadowed declaration is here [-Werror=shadow-compatible-local]
```
In each case, I removed the "int" from the latter declaration.

Reviewed By: philippv

Differential Revision: D3966308

fbshipit-source-id: 584cb9ffe8ba0e56914223c440efabe9e0de6b17
parent 2ff9d181
......@@ -563,7 +563,7 @@ std::unique_ptr<IOBuf> ZlibCodec::doCompress(const IOBuf* data) {
bool success = false;
SCOPE_EXIT {
int rc = deflateEnd(&stream);
rc = deflateEnd(&stream);
// If we're here because of an exception, it's okay if some data
// got dropped.
CHECK(rc == Z_OK || (!success && rc == Z_DATA_ERROR))
......@@ -647,7 +647,7 @@ std::unique_ptr<IOBuf> ZlibCodec::doUncompress(const IOBuf* data,
bool success = false;
SCOPE_EXIT {
int rc = inflateEnd(&stream);
rc = inflateEnd(&stream);
// If we're here because of an exception, it's okay if some data
// got dropped.
CHECK(rc == Z_OK || (!success && rc == Z_DATA_ERROR))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment