Skip to content

Commit 79f8355

Browse files
author
Jarkko Paso
committed
Fixed compilation warnings
1 parent 12d4497 commit 79f8355

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

features/nanostack/sal-stack-nanostack/source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ static void ws_bootstrap_pan_advertisement_solicit_analyse(struct protocol_inter
11891189
if (ws_bootstrap_state_discovery(cur) &&
11901190
cur->bootsrap_state_machine_cnt > cur->ws_info->trickle_params_pan_discovery.Imin + 50) {
11911191
cur->bootsrap_state_machine_cnt = cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
1192-
tr_info("Making parent selection in %d s", (uint32_t)(cur->bootsrap_state_machine_cnt / 10));
1192+
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
11931193
}
11941194
}
11951195

@@ -2294,7 +2294,7 @@ static void ws_bootstrap_start_discovery(protocol_interface_info_entry_t *cur)
22942294
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);
22952295

22962296
cur->bootsrap_state_machine_cnt = time_to_solicit + cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
2297-
tr_info("Making parent selection in %d s", (uint32_t)(cur->bootsrap_state_machine_cnt / 10));
2297+
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
22982298
}
22992299

23002300
// Start authentication
@@ -2355,7 +2355,7 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
23552355
// Go back for network scanning
23562356
ws_bootstrap_state_change(cur, ER_ACTIVE_SCAN);
23572357
cur->bootsrap_state_machine_cnt = randLIB_get_random_in_range(10, cur->ws_info->trickle_params_pan_discovery.Imin >> 1);
2358-
tr_info("Making parent selection in %d s", (uint32_t)(cur->bootsrap_state_machine_cnt / 10));
2358+
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
23592359
} else {
23602360
tr_debug("authentication failed");
23612361
// What else to do to start over again...
@@ -2727,7 +2727,7 @@ void ws_bootstrap_network_scan_process(protocol_interface_info_entry_t *cur)
27272727
if (!selected_parent_ptr) {
27282728
// Next check will be after one trickle
27292729
cur->bootsrap_state_machine_cnt += cur->ws_info->trickle_params_pan_discovery.Imin + randLIB_get_8bit() % 50;
2730-
tr_info("Making parent selection in %d s", (uint32_t)(cur->bootsrap_state_machine_cnt / 10));
2730+
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
27312731
return;
27322732
}
27332733
tr_info("selected parent:%s panid %u", trace_array(selected_parent_ptr->addr, 8), selected_parent_ptr->pan_id);

features/nanostack/sal-stack-nanostack/source/DHCPv6_Server/DHCPv6_Server_service.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static void DHCP_server_service_timer_stop(void)
8787

8888
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)
8989
{
90-
dhcpv6_alloacted_address_entry_t *dhcp_allocated_address;
90+
dhcpv6_alloacted_address_entry_t *dhcp_allocated_address = NULL;
9191
dhcpv6_ia_non_temporal_address_s nonTemporalAddress;
9292
bool address_allocated = false;
9393
//Validate Client DUID

features/nanostack/sal-stack-nanostack/source/MAC/IEEE802_15_4/mac_mcps_sap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,7 @@ static int8_t mcps_generic_packet_build(protocol_interface_rf_mac_setup_s *rf_pt
15431543
mac_header_information_elements_preparation(buffer);
15441544

15451545
mcps_generic_sequence_number_allocate(rf_ptr, buffer);
1546-
mlme_key_descriptor_t *key_desc;
1546+
mlme_key_descriptor_t *key_desc = NULL;
15471547
if (buffer->fcf_dsn.securityEnabled) {
15481548
bool increment_framecounter = false;
15491549
//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
16001600
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);
16011601
buffer->status = MLME_FRAME_TOO_LONG;
16021602
//decrement security counter
1603-
if (buffer->fcf_dsn.securityEnabled) {
1603+
if (key_desc) {
16041604
mac_sec_mib_key_outgoing_frame_counter_decrement(rf_ptr, key_desc);
16051605
}
16061606
return -1;
@@ -1716,7 +1716,7 @@ int8_t mcps_generic_ack_build(protocol_interface_rf_mac_setup_s *rf_ptr, bool in
17161716

17171717
ccm_globals_t ccm_ptr;
17181718
mac_pre_build_frame_t *buffer = &rf_ptr->enhanced_ack_buffer;
1719-
mlme_key_descriptor_t *key_desc;
1719+
mlme_key_descriptor_t *key_desc = NULL;
17201720

17211721
if (buffer->fcf_dsn.securityEnabled) {
17221722
//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
17551755
if ((frame_length) > ack_mtu_size - 2) {
17561756
buffer->status = MLME_FRAME_TOO_LONG;
17571757

1758-
if (buffer->fcf_dsn.securityEnabled) {
1758+
if (key_desc) {
17591759
//decrement security counter
17601760
mac_sec_mib_key_outgoing_frame_counter_decrement(rf_ptr, key_desc);
17611761
ccm_free(&ccm_ptr);

0 commit comments

Comments
 (0)