From: Sage Weil Date: Fri, 28 Sep 2012 14:12:39 +0000 (-0700) Subject: LogEntry: fix uninit in ctor X-Git-Tag: v0.54~187^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae1c38f19540a3de16a1cdd9dec32f97571311eb;p=ceph.git LogEntry: fix uninit in ctor 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 --- diff --git a/src/log/Entry.h b/src/log/Entry.h index 9b6d15f9eb7c..7f6b1499f9d3 100644 --- a/src/log/Entry.h +++ b/src/log/Entry.h @@ -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)