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

osd: fix coverity warning for uninitialized members #12724

Merged
merged 7 commits into from Jan 9, 2017
2 changes: 1 addition & 1 deletion src/os/bluestore/BitAllocator.cc
Expand Up @@ -740,7 +740,7 @@ bmap_area_type_t BitMapArea::get_type()
* BitMapArea Leaf and Internal
*/
BitMapAreaIN::BitMapAreaIN(CephContext* cct)
: BitMapArea(cct)
: BitMapArea(cct), m_child_list(nullptr)
{
// nothing
}
Expand Down
3 changes: 2 additions & 1 deletion src/os/bluestore/BitAllocator.h
Expand Up @@ -194,6 +194,7 @@ class BmapEntry {
};

typedef enum bmap_area_type {
UNDEFINED = 0,
ZONE = 1,
LEAF = 2,
NON_LEAF = 3
Expand Down Expand Up @@ -263,7 +264,7 @@ class BitMapArea {
int64_t get_level();
bmap_area_type_t get_type();
virtual void dump_state(int& count) = 0;
BitMapArea(CephContext* cct) : cct(cct) {}
BitMapArea(CephContext* cct) : cct(cct), m_type(UNDEFINED) {}
virtual ~BitMapArea() { }
};

Expand Down
3 changes: 2 additions & 1 deletion src/os/bluestore/BitmapFreelistManager.cc
Expand Up @@ -53,7 +53,8 @@ BitmapFreelistManager::BitmapFreelistManager(CephContext* cct,
: FreelistManager(cct),
meta_prefix(meta_prefix),
bitmap_prefix(bitmap_prefix),
kvdb(db)
kvdb(db),
enumerate_bl_pos(0)
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/os/bluestore/BlueStore.h
Expand Up @@ -843,7 +843,7 @@ class BlueStore : public ObjectStore,

static Cache *create(CephContext* cct, string type, PerfCounters *logger);

Cache(CephContext* cct) : cct(cct) {}
Cache(CephContext* cct) : cct(cct), logger(nullptr) {}
virtual ~Cache() {}

virtual void _add_onode(OnodeRef& o, int level) = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/os/kstore/KStore.h
Expand Up @@ -83,7 +83,8 @@ class KStore : public ObjectStore {
oid(o),
key(k),
dirty(false),
exists(false) {
exists(false),
tail_offset(0) {
}

void flush();
Expand Down
2 changes: 1 addition & 1 deletion src/osd/OSD.h
Expand Up @@ -638,7 +638,7 @@ class OSDService {
utime_t sched_time;
/// the hard upper bound of scrub time
utime_t deadline;
ScrubJob() {}
ScrubJob() : cct(nullptr) {}
explicit ScrubJob(CephContext* cct, const spg_t& pg,
const utime_t& timestamp,
double pool_scrub_min_interval = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/osd/PrimaryLogPG.cc
Expand Up @@ -73,7 +73,7 @@ static ostream& _prefix(std::ostream *_dout, T *pg) {

MEMPOOL_DEFINE_OBJECT_FACTORY(PrimaryLogPG, replicatedpg, osd);

PGLSFilter::PGLSFilter()
PGLSFilter::PGLSFilter() : cct(nullptr)
{
}

Expand Down