mirror of https://github.com/ARMmbed/mbed-os.git
Fixed compilation warnings
parent
12d4497ab7
commit
79f8355334
|
|
@ -1189,7 +1189,7 @@ static void ws_bootstrap_pan_advertisement_solicit_analyse(struct protocol_inter
|
||||||
if (ws_bootstrap_state_discovery(cur) &&
|
if (ws_bootstrap_state_discovery(cur) &&
|
||||||
cur->bootsrap_state_machine_cnt > cur->ws_info->trickle_params_pan_discovery.Imin + 50) {
|
cur->bootsrap_state_machine_cnt > cur->ws_info->trickle_params_pan_discovery.Imin + 50) {
|
||||||
cur->bootsrap_state_machine_cnt = cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
|
cur->bootsrap_state_machine_cnt = cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
|
||||||
tr_info("Making parent selection in %d s", (uint32_t)(cur->bootsrap_state_machine_cnt / 10));
|
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2294,7 +2294,7 @@ static void ws_bootstrap_start_discovery(protocol_interface_info_entry_t *cur)
|
||||||
cur->ws_info->trickle_pan_advertisement_solicit.I, cur->ws_info->trickle_pan_advertisement_solicit.t, cur->ws_info->trickle_pan_advertisement_solicit.now, cur->ws_info->trickle_pan_advertisement_solicit.c);
|
cur->ws_info->trickle_pan_advertisement_solicit.I, cur->ws_info->trickle_pan_advertisement_solicit.t, cur->ws_info->trickle_pan_advertisement_solicit.now, cur->ws_info->trickle_pan_advertisement_solicit.c);
|
||||||
|
|
||||||
cur->bootsrap_state_machine_cnt = time_to_solicit + cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
|
cur->bootsrap_state_machine_cnt = time_to_solicit + cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
|
||||||
tr_info("Making parent selection in %d s", (uint32_t)(cur->bootsrap_state_machine_cnt / 10));
|
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start authentication
|
// Start authentication
|
||||||
|
|
@ -2355,7 +2355,7 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
|
||||||
// Go back for network scanning
|
// Go back for network scanning
|
||||||
ws_bootstrap_state_change(cur, ER_ACTIVE_SCAN);
|
ws_bootstrap_state_change(cur, ER_ACTIVE_SCAN);
|
||||||
cur->bootsrap_state_machine_cnt = randLIB_get_random_in_range(10, cur->ws_info->trickle_params_pan_discovery.Imin >> 1);
|
cur->bootsrap_state_machine_cnt = randLIB_get_random_in_range(10, cur->ws_info->trickle_params_pan_discovery.Imin >> 1);
|
||||||
tr_info("Making parent selection in %d s", (uint32_t)(cur->bootsrap_state_machine_cnt / 10));
|
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
|
||||||
} else {
|
} else {
|
||||||
tr_debug("authentication failed");
|
tr_debug("authentication failed");
|
||||||
// What else to do to start over again...
|
// What else to do to start over again...
|
||||||
|
|
@ -2727,7 +2727,7 @@ void ws_bootstrap_network_scan_process(protocol_interface_info_entry_t *cur)
|
||||||
if (!selected_parent_ptr) {
|
if (!selected_parent_ptr) {
|
||||||
// Next check will be after one trickle
|
// Next check will be after one trickle
|
||||||
cur->bootsrap_state_machine_cnt += cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
|
cur->bootsrap_state_machine_cnt += cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
|
||||||
tr_info("Making parent selection in %d s", (uint32_t)(cur->bootsrap_state_machine_cnt / 10));
|
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tr_info("selected parent:%s panid %u", trace_array(selected_parent_ptr->addr, 8), selected_parent_ptr->pan_id);
|
tr_info("selected parent:%s panid %u", trace_array(selected_parent_ptr->addr, 8), selected_parent_ptr->pan_id);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ static void DHCP_server_service_timer_stop(void)
|
||||||
|
|
||||||
int DHCPv6_server_respond_client(dhcpv6_gua_server_entry_s *serverBase, dhcpv6_reply_packet_s *replyPacket, dhcp_ia_non_temporal_params_t *dhcp_ia_non_temporal_params, dhcpv6_gua_response_t *response, bool allocateNew)
|
int DHCPv6_server_respond_client(dhcpv6_gua_server_entry_s *serverBase, dhcpv6_reply_packet_s *replyPacket, dhcp_ia_non_temporal_params_t *dhcp_ia_non_temporal_params, dhcpv6_gua_response_t *response, bool allocateNew)
|
||||||
{
|
{
|
||||||
dhcpv6_alloacted_address_entry_t *dhcp_allocated_address;
|
dhcpv6_alloacted_address_entry_t *dhcp_allocated_address = NULL;
|
||||||
dhcpv6_ia_non_temporal_address_s nonTemporalAddress;
|
dhcpv6_ia_non_temporal_address_s nonTemporalAddress;
|
||||||
bool address_allocated = false;
|
bool address_allocated = false;
|
||||||
//Validate Client DUID
|
//Validate Client DUID
|
||||||
|
|
|
||||||
|
|
@ -1543,7 +1543,7 @@ static int8_t mcps_generic_packet_build(protocol_interface_rf_mac_setup_s *rf_pt
|
||||||
mac_header_information_elements_preparation(buffer);
|
mac_header_information_elements_preparation(buffer);
|
||||||
|
|
||||||
mcps_generic_sequence_number_allocate(rf_ptr, buffer);
|
mcps_generic_sequence_number_allocate(rf_ptr, buffer);
|
||||||
mlme_key_descriptor_t *key_desc;
|
mlme_key_descriptor_t *key_desc = NULL;
|
||||||
if (buffer->fcf_dsn.securityEnabled) {
|
if (buffer->fcf_dsn.securityEnabled) {
|
||||||
bool increment_framecounter = false;
|
bool increment_framecounter = false;
|
||||||
//Remember to update security counter here!
|
//Remember to update security counter here!
|
||||||
|
|
@ -1600,7 +1600,7 @@ static int8_t mcps_generic_packet_build(protocol_interface_rf_mac_setup_s *rf_pt
|
||||||
tr_debug("Too Long %u, %u pa %u header %u mic %u", frame_length, mac_payload_length, buffer->mac_header_length_with_security, buffer->security_mic_len, dev_driver->phy_MTU);
|
tr_debug("Too Long %u, %u pa %u header %u mic %u", frame_length, mac_payload_length, buffer->mac_header_length_with_security, buffer->security_mic_len, dev_driver->phy_MTU);
|
||||||
buffer->status = MLME_FRAME_TOO_LONG;
|
buffer->status = MLME_FRAME_TOO_LONG;
|
||||||
//decrement security counter
|
//decrement security counter
|
||||||
if (buffer->fcf_dsn.securityEnabled) {
|
if (key_desc) {
|
||||||
mac_sec_mib_key_outgoing_frame_counter_decrement(rf_ptr, key_desc);
|
mac_sec_mib_key_outgoing_frame_counter_decrement(rf_ptr, key_desc);
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -1716,7 +1716,7 @@ int8_t mcps_generic_ack_build(protocol_interface_rf_mac_setup_s *rf_ptr, bool in
|
||||||
|
|
||||||
ccm_globals_t ccm_ptr;
|
ccm_globals_t ccm_ptr;
|
||||||
mac_pre_build_frame_t *buffer = &rf_ptr->enhanced_ack_buffer;
|
mac_pre_build_frame_t *buffer = &rf_ptr->enhanced_ack_buffer;
|
||||||
mlme_key_descriptor_t *key_desc;
|
mlme_key_descriptor_t *key_desc = NULL;
|
||||||
|
|
||||||
if (buffer->fcf_dsn.securityEnabled) {
|
if (buffer->fcf_dsn.securityEnabled) {
|
||||||
//Remember to update security counter here!
|
//Remember to update security counter here!
|
||||||
|
|
@ -1755,7 +1755,7 @@ int8_t mcps_generic_ack_build(protocol_interface_rf_mac_setup_s *rf_ptr, bool in
|
||||||
if ((frame_length) > ack_mtu_size - 2) {
|
if ((frame_length) > ack_mtu_size - 2) {
|
||||||
buffer->status = MLME_FRAME_TOO_LONG;
|
buffer->status = MLME_FRAME_TOO_LONG;
|
||||||
|
|
||||||
if (buffer->fcf_dsn.securityEnabled) {
|
if (key_desc) {
|
||||||
//decrement security counter
|
//decrement security counter
|
||||||
mac_sec_mib_key_outgoing_frame_counter_decrement(rf_ptr, key_desc);
|
mac_sec_mib_key_outgoing_frame_counter_decrement(rf_ptr, key_desc);
|
||||||
ccm_free(&ccm_ptr);
|
ccm_free(&ccm_ptr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue