folly/fibers/TimedMutex-inl.h: avoid shadowing warnings
authorJim Meyering <meyering@fb.com>
Mon, 19 Dec 2016 17:53:32 +0000 (09:53 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 19 Dec 2016 18:03:02 +0000 (10:03 -0800)
Summary:
Fix a warning exposed by gcc's -Wshadow-compatible-local.

Rename inner "lockStolen" to "stolen".

Differential Revision: D4346385

fbshipit-source-id: 323cb6c96ecfe18b5540525f4124dbd75faf0b1b

folly/fibers/TimedMutex-inl.h

index 26e523c73f0f1463deb380986732ee20d5884aa1..b6736cd52d2e11b437dd35a2c424733f277e5a92 100644 (file)
@@ -61,9 +61,9 @@ TimedMutex::LockResult TimedMutex::lockHelper(WaitFunc&& waitFunc) {
     auto lockStolen = [&] {
       std::lock_guard<folly::SpinLock> lg(lock_);
 
-      auto lockStolen = notifiedFiber_ != &waiter;
+      auto stolen = notifiedFiber_ != &waiter;
       notifiedFiber_ = nullptr;
-      return lockStolen;
+      return stolen;
     }();
 
     if (lockStolen) {