BFS: CachedNode initialize members
Fixes CID 609586: Uninitialized members (UNINIT_CTOR) Non-static class member "fWritable" is not initialized in this constructor nor in any functions that it calls. Also initialize fOffset and fBlockNumber to 0 for good measure.
This commit is contained in:
@@ -165,7 +165,10 @@ public:
|
||||
CachedNode(BPlusTree* tree)
|
||||
:
|
||||
fTree(tree),
|
||||
fNode(NULL)
|
||||
fNode(NULL),
|
||||
fOffset(0),
|
||||
fBlockNumber(0),
|
||||
fWritable(false)
|
||||
{
|
||||
#if _BOOT_MODE
|
||||
fBlock = NULL;
|
||||
@@ -175,7 +178,10 @@ public:
|
||||
CachedNode(BPlusTree* tree, off_t offset, bool check = true)
|
||||
:
|
||||
fTree(tree),
|
||||
fNode(NULL)
|
||||
fNode(NULL),
|
||||
fOffset(0),
|
||||
fBlockNumber(0),
|
||||
fWritable(false)
|
||||
{
|
||||
#if _BOOT_MODE
|
||||
fBlock = NULL;
|
||||
|
||||
Reference in New Issue
Block a user