Fix violations of unused-lambda-capture
[folly.git] / folly / test / ThreadLocalTest.cpp
index 392a52fc93cb3a036c57e156db52db2f8df8a40f..62526ebc8a8165e14fd34166d76ed0a3149f4afb 100644 (file)
@@ -313,10 +313,12 @@ TEST(ThreadLocalPtr, AccessAllThreadsCounter) {
   std::atomic<int> totalAtomic(0);
   std::vector<std::thread> threads;
   for (int i = 0; i < kNumThreads; ++i) {
-    threads.push_back(std::thread([&,i]() {
+    threads.push_back(std::thread([&]() {
       stci.add(1);
       totalAtomic.fetch_add(1);
-      while (run.load()) { usleep(100); }
+      while (run.load()) {
+        usleep(100);
+      }
     }));
   }
   while (totalAtomic.load() != kNumThreads) { usleep(100); }