Skip to content

Commit 2e34127

Browse files
hisundarabhinavdangeti
authored andcommitted
Fix Coverity Scan warning on uninitialized variable
*** CID 157851: Uninitialized members (UNINIT_CTOR) /forestdb/src/hbtrie.h: 158 in HBTrieValue::HBTrieValue(unsigned char, void *, unsigned long)() 152 valueLen = _value_len; CID 157851: Uninitialized members (UNINIT_CTOR) Non-static class member "offset" is not initialized in this constructor nor in any functions that it calls. Change-Id: I09c75d500663437862d549c5d127aea7400b41cb Reviewed-on: http://review.couchbase.org/70878 Reviewed-by: abhinav dangeti <abhinav@couchbase.com> Tested-by: Sundararaman Sridharan <sundar@couchbase.com>
1 parent 37d480b commit 2e34127

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hbtrie.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class HBTrieValue {
144144
HBTrieValue(uint8_t _flags,
145145
void *_value,
146146
size_t _value_len) :
147-
flags(_flags), valueLen(sizeof(offset)), binary(nullptr)
147+
flags(_flags), valueLen(sizeof(offset)), offset(0), binary(nullptr)
148148
{
149149
if (flags & HV_VLEN_DATA) {
150150
// variable-length binary data

0 commit comments

Comments
 (0)