]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common/lockdep: do not set std::string using braces
authorKefu Chai <kchai@redhat.com>
Tue, 17 Oct 2017 12:11:38 +0000 (20:11 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 17 Oct 2017 12:11:40 +0000 (20:11 +0800)
this silences follow warning from clang:

ceph/src/common/lockdep.cc:219:12: warning: braces around scalar initializer [-Wbraced-scalar-init]
    name = { "unknown" };
           ^~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/lockdep.cc

index 251a80150221a8290c9977fa3e35a5ef8a9dbf51..9b00dcd6e3a09fc52c4bc13f5ee5377d4f4cb520 100644 (file)
@@ -216,7 +216,7 @@ void lockdep_unregister(int id)
   std::string name;
   map<int, std::string>::iterator p = lock_names.find(id);
   if (p == lock_names.end())
-    name = { "unknown" };
+    name = "unknown" ;
   else
     name = p->second;