folly/test/SingletonTest.cpp: avoid shadowing warnings
authorJim Meyering <meyering@fb.com>
Wed, 19 Oct 2016 03:03:27 +0000 (20:03 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Wed, 19 Oct 2016 03:09:30 +0000 (20:09 -0700)
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option.

Reviewed By: elsteveogrande

Differential Revision: D4041798

fbshipit-source-id: 9fb6901e791176eb42c31f287655aea6be95a30b

folly/test/SingletonTest.cpp

index 6e8b2323d332b7290f7a104bd0fd6d71f86894df..620dbd11e6602fa14a5c3fd510ee814f7f9ee3e6 100644 (file)
@@ -171,13 +171,11 @@ TEST(Singleton, NaughtyUsage) {
   SingletonNaughtyUsage2<Watchdog> watchdog_singleton;
 
   // double registration
-  EXPECT_DEATH([]() { SingletonNaughtyUsage2<Watchdog> watchdog_singleton; }(),
-               "");
+  EXPECT_DEATH([]() { SingletonNaughtyUsage2<Watchdog> w2; }(), "");
   vault2.destroyInstances();
 
   // double registration after destroy
-  EXPECT_DEATH([]() { SingletonNaughtyUsage2<Watchdog> watchdog_singleton; }(),
-               "");
+  EXPECT_DEATH([]() { SingletonNaughtyUsage2<Watchdog> w3; }(), "");
 }
 
 struct SharedPtrUsageTag {};