]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Fix compile-time warning.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 2 Feb 2011 17:57:14 +0000 (09:57 -0800)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 2 Feb 2011 17:57:37 +0000 (09:57 -0800)
store is properly initialized inside a try block, but the
compiler doesn't notice that and so thinks it may be used
uninitialized. So initialize it to be NULL.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/osd/OSD.cc

index 7a1c09691cacd7c667f487b81c4936aec36041d1..64721200a0f125781d2206ab25ca14d266b3fef3 100644 (file)
@@ -149,7 +149,7 @@ ObjectStore *OSD::create_object_store(const char *dev, const char *jdev)
 int OSD::mkfs(const char *dev, const char *jdev, ceph_fsid_t fsid, int whoami)
 {
   int ret;
-  ObjectStore *store;
+  ObjectStore *store = NULL;
   OSDSuperblock sb;
   sb.fsid = fsid;
   sb.whoami = whoami;