librbd: init vars in AioRequest ctor

At (2): Non-static class member "m_object_no" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "m_object_off" is not initialized in this constructor nor in any functions that it calls.
CID 717222 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (6): Non-static class member "m_object_len" is not initialized in this constructor nor in any functions that it calls.

CID 717223 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "m_parent_overlap" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-10-21 20:55:41 -07:00
parent d2f07cc493
commit 2c45d1cbdf

View File

@ -19,6 +19,7 @@ namespace librbd {
AioRequest::AioRequest() :
m_ictx(NULL),
m_object_no(0), m_object_off(0), m_object_len(0),
m_snap_id(CEPH_NOSNAP), m_completion(NULL), m_parent_completion(NULL),
m_hide_enoent(false) {}
AioRequest::AioRequest(ImageCtx *ictx, const std::string &oid,
@ -108,7 +109,9 @@ namespace librbd {
/** read **/
AbstractWrite::AbstractWrite() : m_state(LIBRBD_AIO_WRITE_FINAL) {}
AbstractWrite::AbstractWrite()
: m_state(LIBRBD_AIO_WRITE_FINAL),
m_parent_overlap(0) {}
AbstractWrite::AbstractWrite(ImageCtx *ictx, const std::string &oid,
uint64_t object_no, uint64_t object_off, uint64_t len,
vector<pair<uint64_t,uint64_t> >& objectx,