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
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))
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))