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

folly/io/async/AsyncSocket.cpp: avoid shadowing warning for "rv"

Summary:
Enabling the proposed-for-upstream gcc -Wshadow-local option exposes this shadowing:
```
folly/io/async/AsyncSocket.cpp: In member function 'virtual void folly::AsyncSocket::connect(folly::AsyncSocket::ConnectCallback*, const folly::SocketAddress&, int, const OptionMap&, const folly::SocketAddress&)':
folly/io/async/AsyncSocket.cpp:421:11: error: declaration of 'rv' shadows a previous local [-Werror=shadow-compatible-local]
folly/io/async/AsyncSocket.cpp:364:9: error: shadowed declaration is here [-Werror=shadow-compatible-local]
```

Reviewed By: ngoyal, knekritz

Differential Revision: D3963873

fbshipit-source-id: 85b3ab1fc3b200b81615a00d66a183cc9c792a90
parent 4d012b25
...@@ -418,7 +418,7 @@ void AsyncSocket::connect(ConnectCallback* callback, ...@@ -418,7 +418,7 @@ void AsyncSocket::connect(ConnectCallback* callback,
// Apply the additional options if any. // Apply the additional options if any.
for (const auto& opt: options) { for (const auto& opt: options) {
int rv = opt.first.apply(fd_, opt.second); rv = opt.first.apply(fd_, opt.second);
if (rv != 0) { if (rv != 0) {
auto errnoCopy = errno; auto errnoCopy = errno;
throw AsyncSocketException( throw AsyncSocketException(
......
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