From e7256a8a282c258dee2e62055ac227761df5e22d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 4 Oct 2016 09:11:08 -0700 Subject: [PATCH] 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 --- folly/io/Compression.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/io/Compression.cpp b/folly/io/Compression.cpp index 0b725703..e1c65ef0 100644 --- a/folly/io/Compression.cpp +++ b/folly/io/Compression.cpp @@ -563,7 +563,7 @@ std::unique_ptr 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 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)) -- 2.34.1