]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
LogEntry: fix uninit in ctor
authorSage Weil <sage@inktank.com>
Fri, 28 Sep 2012 14:12:39 +0000 (07:12 -0700)
committerSage Weil <sage@inktank.com>
Fri, 28 Sep 2012 20:18:05 +0000 (13:18 -0700)
At (2): Non-static class member "m_thread" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "m_prio" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "m_subsys" is not initialized in this constructor nor in any functions that it calls.
CID 717229: Uninitialized scalar field (UNINIT_CTOR)
At (8): Non-static class member "m_static_buf" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
src/log/Entry.h

index 9b6d15f9eb7cf162ecf46a99dc1f2ee0f7c3c0c8..7f6b1499f9d34d71bad6e153ebaf467e1bdeaf62 100644 (file)
@@ -24,7 +24,9 @@ struct Entry {
   PrebufferedStreambuf m_streambuf;
 
   Entry()
-    : m_next(NULL), m_streambuf(m_static_buf, sizeof(m_static_buf))
+    : m_thread(0), m_prio(0), m_subsys(0),
+      m_next(NULL),
+      m_streambuf(m_static_buf, sizeof(m_static_buf))
   {}
   Entry(utime_t s, pthread_t t, short pr, short sub,
        const char *msg = NULL)