Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation warning fix #32

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions IP/IPv4/net_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -8293,11 +8293,11 @@ static void NetIPv4_TxPktValidateOpt (void *p_opts,
NET_ERR *p_err)
{
CPU_INT08U opt_len_size;
CPU_INT08U opt_len;
CPU_INT08U opt_len = 0;
CPU_INT08U opt_nbr_route_ts;
NET_IPv4_OPT_TYPE *p_opt_cfg_type;
void *p_opt_cfg;
void *p_opt_next;
void *p_opt_next = (void *)0;


opt_len_size = 0u;
Expand Down
4 changes: 2 additions & 2 deletions IP/IPv6/net_icmpv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ NET_ICMPv6_REQ_ID_SEQ NetICMPv6_TxMsgReqHandler (NET_IF_NBR if_nbr,
NET_BUF *p_msg_req_head;
NET_BUF *p_chain_buf;
NET_BUF *p_chain_buf_next;
NET_BUF_HDR *p_msg_req_hdr;
NET_BUF_HDR *p_msg_req_hdr = (void *)0;
NET_BUF_HDR *p_chain_buf_hdr;
NET_ICMPv6_HDR_ECHO *p_icmp_hdr_echo;
NET_NDP_NEIGHBOR_SOL_HDR *p_icmp_hdr_neighbor_sol;
Expand Down Expand Up @@ -2672,7 +2672,7 @@ static void NetICMPv6_RxPktValidate (NET_BUF *p_buf,
CPU_INT16U icmp_msg_len_min;
CPU_INT16U icmp_msg_len_max;
CPU_INT16U icmp_msg_len;
NET_ICMPv6_HDR_PARAM_PROB *p_icmp_param_prob;
NET_ICMPv6_HDR_PARAM_PROB *p_icmp_param_prob = (void *)0;
NET_BUF *p_buf_next;
NET_BUF_HDR *p_buf_next_hdr;
NET_IPv6_PSEUDO_HDR ipv6_pseudo_hdr;
Expand Down
2 changes: 1 addition & 1 deletion IP/IPv6/net_mldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ CPU_BOOLEAN NetMLDP_HostGrpLeave (NET_IF_NBR if_nbr,
NET_IPv6_ADDR *p_addr,
NET_ERR *p_err)
{
CPU_BOOLEAN host_grp_leave;
CPU_BOOLEAN host_grp_leave = DEF_FAIL;


/* Acquire net lock (see Note #1b). */
Expand Down
8 changes: 4 additions & 4 deletions IP/IPv6/net_ndp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,19 +1258,19 @@ const NET_IPv6_ADDR *NetNDP_NextHop ( NET_IF_NBR *p_if_nbr,
NET_ERR *p_err)
{
NET_IF_NBR if_nbr;
NET_NDP_DEST_CACHE *p_dest;
NET_NDP_DEST_CACHE *p_dest = (void *)0;
NET_NDP_DEST_CACHE *p_dest_tmp;
NET_NDP_ROUTER *p_router;
const NET_IPv6_ADDR *p_addr_nexthop;
const NET_IPv6_ADDR *p_addr_nexthop = (void *)0;
NET_IPv6_ADDR *p_addr_nexthop_tmp;
NET_IF_NBR if_nbr_tmp;
NET_IF_NBR if_nbr_src_addr;
NET_IF_NBR if_nbr_src_addr = 0;
CPU_INT08U valid_nbr_current;
CPU_INT08U valid_nbr_best;
CPU_BOOLEAN link_local;
CPU_BOOLEAN addr_mcast;
CPU_BOOLEAN on_link;
CPU_BOOLEAN add_dest;
CPU_BOOLEAN add_dest = DEF_NO;
CPU_BOOLEAN add_dest_tmp;
CPU_BOOLEAN dflt_router;
CPU_BOOLEAN is_mcast_grp;
Expand Down
8 changes: 4 additions & 4 deletions Source/net_bsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,22 @@
#ifdef IN6ADDR_ANY_INIT
#undef IN6ADDR_ANY_INIT
#endif
#define IN6ADDR_ANY_INIT { 0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
#define IN6ADDR_ANY_INIT {{ 0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}

#ifdef IN6ADDR_LOOPBACK_INIT
#undef IN6ADDR_LOOPBACK_INIT
#endif
#define IN6ADDR_LOOPBACK_INIT { 0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
#define IN6ADDR_LOOPBACK_INIT {{ 0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}

#ifdef IN6ADDR_LINKLOCAL_ALLNODES_INIT
#undef IN6ADDR_LINKLOCAL_ALLNODES_INIT
#endif
#define IN6ADDR_LINKLOCAL_ALLNODES_INIT { 0xFF,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
#define IN6ADDR_LINKLOCAL_ALLNODES_INIT {{ 0xFF,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}

#ifdef IN6ADDR_LINKLOCAL_ALLROUTERS_INIT
#undef IN6ADDR_LINKLOCAL_ALLROUTERS_INIT
#endif
#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT { 0xFF,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2 }
#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT {{ 0xFF,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2 }}

#define INET6_ADDRSTRLEN 46

Expand Down
6 changes: 3 additions & 3 deletions Source/net_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -6227,7 +6227,7 @@ NET_SOCK_RTN_CODE NetSock_Sel (NET_SOCK_QTY sock_nbr_max,
LIB_ERR lib_err;
KAL_ERR err_kal;
KAL_ERR err_kal_del;
NET_ERR err;
NET_ERR err = 0;



Expand Down Expand Up @@ -16606,7 +16606,7 @@ static NET_SOCK_RTN_CODE NetSock_RxDataHandler (NET_SOCK_ID sock_id,
CPU_BOOLEAN secure;
#endif
NET_SOCK *p_sock;
NET_SOCK_RTN_CODE rtn_code;
NET_SOCK_RTN_CODE rtn_code = 0;



Expand Down Expand Up @@ -17900,7 +17900,7 @@ static NET_SOCK_RTN_CODE NetSock_TxDataHandler (NET_SOCK_ID sock_id,
CPU_BOOLEAN secure;
#endif
NET_SOCK *p_sock;
NET_SOCK_RTN_CODE rtn_code;
NET_SOCK_RTN_CODE rtn_code = 0;



Expand Down
10 changes: 3 additions & 7 deletions Source/net_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12065,7 +12065,7 @@ static void NetTCP_RxPktConnHandlerFinWait2 (NET_TCP_CONN *p_conn,
NET_TCP_SEQ_CODE seq_code;
NET_TCP_ACK_CODE ack_code;
NET_TCP_RESET_CODE reset_code;
CPU_BOOLEAN data_avail;
CPU_BOOLEAN data_avail = DEF_NO;
NET_TMR_TICK timeout_tick;
CPU_FNCT_PTR timeout_fnct;
NET_TCP_FREE_CODE free_code;
Expand Down Expand Up @@ -16434,7 +16434,6 @@ static void NetTCP_RxPktConnHandlerReTxQ (NET_TCP_CONN *p_conn,
NET_TCP_SEQ_NBR seq_nbr_next = 0u;
NET_TCP_SEQ_NBR seq_nbr = 0u;
NET_TCP_SEG_SIZE seg_len = 0u;
NET_TCP_SEG_SIZE seg_len_tot = 0u;
NET_TCP_SEG_SIZE seg_len_data = 0u;
NET_TCP_SEG_SIZE seg_len_data_tot = 0u;
NET_TCP_TX_RTT_TS_MS seg_rtt_ts_txd_ms = 0u;
Expand Down Expand Up @@ -16588,7 +16587,6 @@ static void NetTCP_RxPktConnHandlerReTxQ (NET_TCP_CONN *p_conn,
p_buf_q_head = p_conn->ReTxQ_Head;
p_buf_q_prev = DEF_NULL;
p_buf_q = p_buf_q_head;
seg_len_tot = 0u;
seg_len_data_tot = 0u;
/* Chk re-tx'd seg(s) [see Notes #8a2A1 & #4]. */
segs_re_txd = (p_conn->TxSeqNbrUnAckdPrev == p_conn->TxSeqNbrUnReTxd)
Expand Down Expand Up @@ -16633,7 +16631,6 @@ static void NetTCP_RxPktConnHandlerReTxQ (NET_TCP_CONN *p_conn,
p_buf_q_prev = p_buf_q;
p_buf_q = p_buf_q_next; /* ... adv to next re-tx Q seg. */
p_conn->TxSeqNbrUnAckdAlignDelta = 0u;
seg_len_tot += seg_len;
seg_len_data_tot += seg_len_data;
seqs_ackd = DEF_YES;

Expand Down Expand Up @@ -16662,7 +16659,6 @@ static void NetTCP_RxPktConnHandlerReTxQ (NET_TCP_CONN *p_conn,
p_buf_q_hdr->TCP_SeqNbr += ack_delta_seq_align;
p_buf_q_hdr->TCP_SegLen -= ack_delta_seq_align;
p_buf_q_hdr->TCP_SegLenData -= ack_delta_seq_align;
seg_len_tot += ack_delta_seq_align;
seg_len_data_tot += ack_delta_seq_align;
/* ... & update TCP tx buf ctrls. */
p_buf_q_hdr->DataIx += ack_delta_seq_align;
Expand Down Expand Up @@ -28810,7 +28806,7 @@ static void NetTCP_TxPktValidateOpt (void *p_opts_tcp,
CPU_INT08U opt_nbr_max_seg_size;
NET_TCP_OPT_TYPE *p_opt_cfg_type;
void *p_opt_cfg;
void *p_opt_next;
void *p_opt_next = (void *)0;


opt_len_size = 0u;
Expand Down Expand Up @@ -29728,7 +29724,7 @@ static void NetTCP_TxPktPrepareHdr (NET_BUF *p_buf,
NET_TCP_HDR_FLAGS tcp_flags;
NET_TCP_HDR_FLAGS tcp_hdr_len_flags;
CPU_INT16U tcp_opt_ix;
NET_CHK_SUM tcp_chk_sum;
NET_CHK_SUM tcp_chk_sum = 0u;

/* ----------------- UPDATE BUF CTRLS ----------------- */
p_buf_hdr->TransportHdrLen = tcp_hdr_len_tot;
Expand Down