From: Danny Al-Gaaf Date: Wed, 22 Oct 2014 08:50:15 +0000 (+0200) Subject: test_sharedptr_registry.cc: reduce scope of local variable X-Git-Tag: v0.88~22^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8ebe9e9de50d658b7a736e5388808f8e4cf9f97b;p=ceph.git test_sharedptr_registry.cc: reduce scope of local variable Signed-off-by: Danny Al-Gaaf --- diff --git a/src/test/common/test_sharedptr_registry.cc b/src/test/common/test_sharedptr_registry.cc index 6121b6335b8..9c9e89f9cf7 100644 --- a/src/test/common/test_sharedptr_registry.cc +++ b/src/test/common/test_sharedptr_registry.cc @@ -174,9 +174,9 @@ TEST_F(SharedPtrRegistry_all, wait_lookup_or_create) { TEST_F(SharedPtrRegistry_all, lookup) { SharedPtrRegistryTest registry; unsigned int key = 1; - int value = 2; { shared_ptr ptr = registry.lookup_or_create(key); + int value = 2; *ptr = value; ASSERT_EQ(value, *registry.lookup(key)); }