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 26e523c..b6736cd 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) {