this change silences the warning like:
../src/mon/Monitor.cc: In member function ‘void Monitor::handle_command(MonOpRequestRef)’:
../src/mon/Monitor.cc:3703:55: warning: ‘osd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
3703 | uint64_t seq = mgrstatmon()->get_last_osd_stat_seq(osd);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Signed-off-by: Kefu Chai <kchai@redhat.com>
rs = ss2.str();
r = 0;
} else if (prefix == "osd last-stat-seq") {
- int64_t osd;
+ int64_t osd = 0;
cmd_getval(cmdmap, "id", osd);
uint64_t seq = mgrstatmon()->get_last_osd_stat_seq(osd);
if (f) {
}
int64_t get_dedup_tier() const {
- int64_t tier_id;
+ int64_t tier_id = 0;
opts.get(pool_opts_t::DEDUP_TIER, &tier_id);
return tier_id;
}
int64_t get_dedup_cdc_chunk_size() const {
- int64_t chunk_size;
+ int64_t chunk_size = 0;
opts.get(pool_opts_t::DEDUP_CDC_CHUNK_SIZE, &chunk_size);
return chunk_size;
}