Fixed unit test compiler warnings
This commit is contained in:
@@ -103,7 +103,10 @@ uint16_t MSTP_Put_Receive(struct mstp_port_struct_t *mstp_port)
|
||||
* @return amount of PDU data
|
||||
*/
|
||||
uint16_t MSTP_Get_Send(struct mstp_port_struct_t *mstp_port, unsigned timeout)
|
||||
{ /* milliseconds to wait for a packet */
|
||||
{
|
||||
(void)mstp_port;
|
||||
(void)timeout;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -114,7 +117,10 @@ uint16_t MSTP_Get_Send(struct mstp_port_struct_t *mstp_port, unsigned timeout)
|
||||
* @return amount of PDU data
|
||||
*/
|
||||
uint16_t MSTP_Get_Reply(struct mstp_port_struct_t *mstp_port, unsigned timeout)
|
||||
{ /* milliseconds to wait for a packet */
|
||||
{
|
||||
(void)mstp_port;
|
||||
(void)timeout;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -593,8 +599,6 @@ static void testMasterNodeFSM(void)
|
||||
static void testSlaveNodeFSM(void)
|
||||
{
|
||||
struct mstp_port_struct_t MSTP_Port = { 0 }; /* port data */
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
|
||||
MSTP_Port.InputBuffer = &RxBuffer[0];
|
||||
MSTP_Port.InputBufferSize = sizeof(RxBuffer);
|
||||
@@ -677,8 +681,7 @@ static void testZeroConfigNode_Init(struct mstp_port_struct_t *mstp_port)
|
||||
static void
|
||||
testZeroConfigNode_No_Events_Timeout(struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
bool transition_now;
|
||||
|
||||
SilenceTime = mstp_port->Zero_Config_Silence + 1;
|
||||
transition_now = MSTP_Master_Node_FSM(mstp_port);
|
||||
@@ -690,8 +693,7 @@ testZeroConfigNode_No_Events_Timeout(struct mstp_port_struct_t *mstp_port)
|
||||
static void testZeroConfigNode_Test_Request_Unsupported(
|
||||
struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
bool transition_now;
|
||||
|
||||
/* test case: remote node does not support Test-Request; timeout */
|
||||
SilenceTime = mstp_port->Treply_timeout + 1;
|
||||
@@ -703,31 +705,10 @@ static void testZeroConfigNode_Test_Request_Unsupported(
|
||||
mstp_port->This_Station == mstp_port->Zero_Config_Station, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
testZeroConfigNode_Test_Request_Supported(struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
|
||||
/* test case: remote node supports Test-Request */
|
||||
SilenceTime = 0;
|
||||
|
||||
mstp_port->DestinationAddress = mstp_port->Zero_Config_Station;
|
||||
mstp_port->SourceAddress = 0;
|
||||
mstp_port->FrameType = FRAME_TYPE_TEST_RESPONSE;
|
||||
transition_now = MSTP_Master_Node_FSM(mstp_port);
|
||||
zassert_true(transition_now, NULL);
|
||||
zassert_true(
|
||||
mstp_port->Zero_Config_State == MSTP_ZERO_CONFIG_STATE_USE, NULL);
|
||||
zassert_true(
|
||||
mstp_port->This_Station == mstp_port->Zero_Config_Station, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
testZeroConfigNode_Test_IDLE_InvalidFrame(struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
bool transition_now;
|
||||
|
||||
/* test case: waiting for a invalid frame */
|
||||
SilenceTime = 0;
|
||||
@@ -747,8 +728,7 @@ testZeroConfigNode_Test_IDLE_InvalidFrame(struct mstp_port_struct_t *mstp_port)
|
||||
static void testZeroConfigNode_Test_IDLE_ValidFrameTimeout(
|
||||
struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
bool transition_now;
|
||||
|
||||
/* test case: get a valid frame, followed by timeout */
|
||||
SilenceTime = 0;
|
||||
@@ -775,8 +755,7 @@ static void testZeroConfigNode_Test_IDLE_ValidFrameTimeout(
|
||||
static void
|
||||
testZeroConfigNode_Test_IDLE_ValidFrame(struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
bool transition_now;
|
||||
|
||||
/* test case: get a valid frame, followed by timeout */
|
||||
SilenceTime = 0;
|
||||
@@ -793,8 +772,7 @@ testZeroConfigNode_Test_IDLE_ValidFrame(struct mstp_port_struct_t *mstp_port)
|
||||
static void
|
||||
testZeroConfigNode_Test_LURK_AddressInUse(struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
bool transition_now;
|
||||
uint8_t src, dst;
|
||||
|
||||
/* test case: src emits a token from each MAC in the zero-config range */
|
||||
@@ -820,9 +798,8 @@ testZeroConfigNode_Test_LURK_AddressInUse(struct mstp_port_struct_t *mstp_port)
|
||||
static void testZeroConfigNode_Test_LURK_LearnMaxMaster(
|
||||
struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
uint8_t src, dst;
|
||||
bool transition_now;
|
||||
uint8_t dst;
|
||||
|
||||
/* test case: src emits a token from each MAC in the zero-config range */
|
||||
SilenceTime = 0;
|
||||
@@ -843,8 +820,7 @@ static void testZeroConfigNode_Test_LURK_LearnMaxMaster(
|
||||
static void
|
||||
testZeroConfigNode_Test_LURK_Claim(struct mstp_port_struct_t *mstp_port)
|
||||
{
|
||||
bool transition_now, non_zero;
|
||||
unsigned slots, silence, i;
|
||||
bool transition_now;
|
||||
uint8_t src = 0, dst, count, count_max, count_claim;
|
||||
|
||||
/* test case: src emits a PFM from each MAC in the zero-config range */
|
||||
|
||||
Reference in New Issue
Block a user