diff --git a/src/test/librados_test_stub/TestIoCtxImpl.h b/src/test/librados_test_stub/TestIoCtxImpl.h index 3568cd3206d74..7712e77307078 100644 --- a/src/test/librados_test_stub/TestIoCtxImpl.h +++ b/src/test/librados_test_stub/TestIoCtxImpl.h @@ -185,9 +185,9 @@ class TestIoCtxImpl { }; TestRadosClient *m_client; - int64_t m_pool_id; + int64_t m_pool_id = 0; std::string m_pool_name; - snap_t m_snap_seq; + snap_t m_snap_seq = 0; SnapContext m_snapc; std::atomic m_refcount = { 0 }; std::atomic m_pending_ops = { 0 }; diff --git a/src/test/librbd/io/test_mock_ImageRequestWQ.cc b/src/test/librbd/io/test_mock_ImageRequestWQ.cc index 66589e5088dc0..5222c0eb6c687 100644 --- a/src/test/librbd/io/test_mock_ImageRequestWQ.cc +++ b/src/test/librbd/io/test_mock_ImageRequestWQ.cc @@ -23,7 +23,7 @@ namespace io { template <> struct ImageRequest { static ImageRequest* s_instance; - AioCompletion *aio_comp; + AioCompletion *aio_comp = nullptr; static ImageRequest* create_write_request(librbd::MockTestImageCtx &image_ctx, AioCompletion *aio_comp, diff --git a/src/tools/rbd_mirror/image_sync/ObjectCopyRequest.h b/src/tools/rbd_mirror/image_sync/ObjectCopyRequest.h index 8430e7030c439..57963c22ca330 100644 --- a/src/tools/rbd_mirror/image_sync/ObjectCopyRequest.h +++ b/src/tools/rbd_mirror/image_sync/ObjectCopyRequest.h @@ -116,7 +116,7 @@ class ObjectCopyRequest { std::string m_remote_oid; librados::snap_set_t m_snap_set; - int m_snap_ret; + int m_snap_ret = 0; bool m_retry_missing_read = false; librados::snap_set_t m_retry_snap_set;