Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messages: Initializing uninitialized members module messages #16817

Merged
merged 1 commit into from Aug 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/messages/MOSDFailure.h
Expand Up @@ -33,9 +33,9 @@ class MOSDFailure : public PaxosServiceMessage {

uuid_d fsid;
entity_inst_t target_osd;
__u8 flags;
epoch_t epoch;
int32_t failed_for; // known to be failed since at least this long
__u8 flags = 0;
epoch_t epoch = 0;
int32_t failed_for = 0; // known to be failed since at least this long

MOSDFailure() : PaxosServiceMessage(MSG_OSD_FAILURE, 0, HEAD_VERSION) { }
MOSDFailure(const uuid_d &fs, const entity_inst_t& f, int duration, epoch_t e)
Expand Down
2 changes: 1 addition & 1 deletion src/messages/MOSDMap.h
Expand Up @@ -28,7 +28,7 @@ class MOSDMap : public Message {
uuid_d fsid;
map<epoch_t, bufferlist> maps;
map<epoch_t, bufferlist> incremental_maps;
epoch_t oldest_map, newest_map;
epoch_t oldest_map =0, newest_map = 0;

epoch_t get_first() const {
epoch_t e = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/messages/MOSDOp.h
Expand Up @@ -37,11 +37,11 @@ class MOSDOp : public MOSDFastDispatchOp {
static const int COMPAT_VERSION = 3;

private:
uint32_t client_inc;
__u32 osdmap_epoch;
__u32 flags;
uint32_t client_inc = 0;
__u32 osdmap_epoch = 0;
__u32 flags = 0;
utime_t mtime;
int32_t retry_attempt; // 0 is first attempt. -1 if we don't know.
int32_t retry_attempt = -1; // 0 is first attempt. -1 if we don't know.

hobject_t hobj;
spg_t pgid;
Expand Down
8 changes: 4 additions & 4 deletions src/messages/MOSDOpReply.h
Expand Up @@ -38,13 +38,13 @@ class MOSDOpReply : public Message {
object_t oid;
pg_t pgid;
vector<OSDOp> ops;
int64_t flags;
int64_t flags = 0;
errorcode32_t result;
eversion_t bad_replay_version;
eversion_t replay_version;
version_t user_version;
epoch_t osdmap_epoch;
int32_t retry_attempt;
version_t user_version = 0;
epoch_t osdmap_epoch = 0;
int32_t retry_attempt = -1;
bool do_redirect;
request_redirect_t redirect;

Expand Down
4 changes: 2 additions & 2 deletions src/messages/MOSDPGBackfill.h
Expand Up @@ -35,8 +35,8 @@ class MOSDPGBackfill : public MOSDFastDispatchOp {
}
}

__u32 op;
epoch_t map_epoch, query_epoch;
__u32 op = 0;
epoch_t map_epoch = 0, query_epoch = 0;
spg_t pgid;
hobject_t last_backfill;
pg_stat_t stats;
Expand Down
2 changes: 1 addition & 1 deletion src/messages/MOSDPGCreate.h
Expand Up @@ -28,7 +28,7 @@ struct MOSDPGCreate : public Message {
const static int HEAD_VERSION = 3;
const static int COMPAT_VERSION = 3;

version_t epoch;
version_t epoch = 0;
map<pg_t,pg_create_t> mkpg;
map<pg_t,utime_t> ctimes;

Expand Down