From: Jim Meyering Date: Wed, 19 Oct 2016 03:03:27 +0000 (-0700) Subject: folly/test/SingletonTest.cpp: avoid shadowing warnings X-Git-Tag: v2016.10.24.00~20 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e15a8227e633273bf0b88f34bebf9f864c90ac69;p=folly.git folly/test/SingletonTest.cpp: avoid shadowing warnings Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: elsteveogrande Differential Revision: D4041798 fbshipit-source-id: 9fb6901e791176eb42c31f287655aea6be95a30b --- diff --git a/folly/test/SingletonTest.cpp b/folly/test/SingletonTest.cpp index 6e8b2323..620dbd11 100644 --- a/folly/test/SingletonTest.cpp +++ b/folly/test/SingletonTest.cpp @@ -171,13 +171,11 @@ TEST(Singleton, NaughtyUsage) { SingletonNaughtyUsage2 watchdog_singleton; // double registration - EXPECT_DEATH([]() { SingletonNaughtyUsage2 watchdog_singleton; }(), - ""); + EXPECT_DEATH([]() { SingletonNaughtyUsage2 w2; }(), ""); vault2.destroyInstances(); // double registration after destroy - EXPECT_DEATH([]() { SingletonNaughtyUsage2 watchdog_singleton; }(), - ""); + EXPECT_DEATH([]() { SingletonNaughtyUsage2 w3; }(), ""); } struct SharedPtrUsageTag {};