mirror of
https://github.com/espressif/openthread.git
synced 2026-08-06 10:47:46 +00:00
Fix warnings of found by scan-build (#1746)
* fix warnings of found by scan * revert the implementation of ChildTableEntry
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user