Fix warnings of found by scan-build (#1746)

* fix warnings of found by scan

* revert the implementation of ChildTableEntry
This commit is contained in:
Buke Po
2017-05-09 19:33:16 -07:00
committed by Jonathan Hui
parent 9aabd7f813
commit ff5c068a5a
3 changed files with 33 additions and 5 deletions
+8
View File
@@ -54,6 +54,14 @@ OT_TOOL_PACKED_BEGIN
class Tlv
{
public:
/**
* Default constructor.
*
*/
Tlv(void):
mType(0),
mLength(0) {}
/**
* This method returns the Type value.
*
+8
View File
@@ -337,6 +337,14 @@ OT_TOOL_PACKED_BEGIN
class OptionHeader
{
public:
/**
* Default constructor.
*
*/
OptionHeader(void):
mType(0),
mLength(0) {}
/**
* This method returns the IPv6 Option Type value.
*
+17 -5
View File
@@ -1156,6 +1156,14 @@ OT_TOOL_PACKED_BEGIN
class ChildTableEntry
{
public:
/**
* Default constructor.
*
*/
ChildTableEntry(void):
mTimeoutRsvChildId(0),
mMode(0) {}
/**
* This method returns the Timeout value.
*
@@ -1230,17 +1238,21 @@ public:
}
private:
/**
* Masks for fields.
*
*/
enum
{
kTimeoutMask = 0xF800,
kTimeoutOffset = 11,
kReservedMask = 0x0600,
kTimeoutMask = 0xf800,
kTimeoutOffset = 11,
kReservedMask = 0x0600,
kReservedOffset = 9,
kChildIdMask = 0x1ff
kChildIdMask = 0x1ff
};
uint16_t mTimeoutRsvChildId;
uint8_t mMode;
uint8_t mMode;
} OT_TOOL_PACKED_END;
/**