svn commit: r333869 - head/sys/netinet

Matt Macy mmacy at FreeBSD.org
Sat May 19 05:56:24 UTC 2018


Author: mmacy
Date: Sat May 19 05:56:21 2018
New Revision: 333869
URL: https://svnweb.freebsd.org/changeset/base/333869

Log:
  netinet silence warnings

Modified:
  head/sys/netinet/igmp.c
  head/sys/netinet/in.c
  head/sys/netinet/in_mcast.c
  head/sys/netinet/ip_mroute.c
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_syscalls.c
  head/sys/netinet/sctputil.c
  head/sys/netinet/siftr.c
  head/sys/netinet/tcp_timewait.c

Modified: head/sys/netinet/igmp.c
==============================================================================
--- head/sys/netinet/igmp.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/igmp.c	Sat May 19 05:56:21 2018	(r333869)
@@ -1846,7 +1846,7 @@ igmp_v3_process_group_timers(struct in_multi_head *inm
 		 * immediate transmission.
 		 */
 		if (query_response_timer_expired) {
-			int retval;
+			int retval __unused;
 
 			retval = igmp_v3_enqueue_group_record(qrq, inm, 0, 1,
 			    (inm->inm_state == IGMP_SG_QUERY_PENDING_MEMBER));
@@ -2562,7 +2562,7 @@ igmp_final_leave(struct in_multi *inm, struct igmp_ifs
 				inm->inm_state = IGMP_NOT_MEMBER;
 				inm->inm_sctimer = 0;
 			} else {
-				int retval;
+				int retval __unused;
 
 				inm_acquire_locked(inm);
 
@@ -2635,7 +2635,7 @@ igmp_v3_enqueue_group_record(struct mbufq *mq, struct 
 	struct ifnet		*ifp;
 	struct ip_msource	*ims, *nims;
 	struct mbuf		*m0, *m, *md;
-	int			 error, is_filter_list_change;
+	int			 is_filter_list_change;
 	int			 minrec0len, m0srcs, msrcs, nbytes, off;
 	int			 record_has_sources;
 	int			 now;
@@ -2645,7 +2645,6 @@ igmp_v3_enqueue_group_record(struct mbufq *mq, struct 
 
 	IN_MULTI_LIST_LOCK_ASSERT();
 
-	error = 0;
 	ifp = inm->inm_ifp;
 	is_filter_list_change = 0;
 	m = NULL;
@@ -3303,7 +3302,7 @@ igmp_v3_dispatch_general_query(struct igmp_ifsoftc *ig
 	struct ifmultiaddr	*ifma;
 	struct ifnet		*ifp;
 	struct in_multi		*inm;
-	int			 retval, loop;
+	int			 retval __unused, loop;
 
 	IN_MULTI_LIST_LOCK_ASSERT();
 	IGMP_LOCK_ASSERT();

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/in.c	Sat May 19 05:56:21 2018	(r333869)
@@ -1152,7 +1152,6 @@ in_lltable_match_prefix(const struct sockaddr *saddr,
 static void
 in_lltable_free_entry(struct lltable *llt, struct llentry *lle)
 {
-	struct ifnet *ifp;
 	size_t pkts_dropped;
 
 	LLE_WLOCK_ASSERT(lle);
@@ -1160,8 +1159,7 @@ in_lltable_free_entry(struct lltable *llt, struct llen
 
 	/* Unlink entry from table if not already */
 	if ((lle->la_flags & LLE_LINKED) != 0) {
-		ifp = llt->llt_ifp;
-		IF_AFDATA_WLOCK_ASSERT(ifp);
+		IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp);
 		lltable_unlink_entry(llt, lle);
 	}
 

Modified: head/sys/netinet/in_mcast.c
==============================================================================
--- head/sys/netinet/in_mcast.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/in_mcast.c	Sat May 19 05:56:21 2018	(r333869)
@@ -347,10 +347,10 @@ inm_lookup_locked(struct ifnet *ifp, const struct in_a
 		if (ifma->ifma_addr->sa_family != AF_INET ||
 			ifma->ifma_protospec == NULL)
 			continue;
-			inm = (struct in_multi *)ifma->ifma_protospec;
-			if (inm->inm_addr.s_addr == ina.s_addr)
-				break;
-			inm = NULL;
+		inm = (struct in_multi *)ifma->ifma_protospec;
+		if (inm->inm_addr.s_addr == ina.s_addr)
+			break;
+		inm = NULL;
 	}
 	return (inm);
 }

Modified: head/sys/netinet/ip_mroute.c
==============================================================================
--- head/sys/netinet/ip_mroute.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/ip_mroute.c	Sat May 19 05:56:21 2018	(r333869)
@@ -1680,7 +1680,7 @@ send_packet(struct vif *vifp, struct mbuf *m)
 {
 	struct ip_moptions imo;
 	struct in_multi *imm[2];
-	int error;
+	int error __unused;
 
 	VIF_LOCK_ASSERT();
 

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/sctp_indata.c	Sat May 19 05:56:21 2018	(r333869)
@@ -1672,8 +1672,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc
     int *break_flag, int last_chunk, uint8_t chk_type)
 {
 	/* Process a data chunk */
-	/* struct sctp_tmit_chunk *chk; */
-	struct sctp_tmit_chunk *chk;
+	struct sctp_tmit_chunk *chk = NULL;
 	uint32_t tsn, fsn, gap, mid;
 	struct mbuf *dmbuf;
 	int the_len;

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/sctp_output.c	Sat May 19 05:56:21 2018	(r333869)
@@ -11030,7 +11030,7 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad
 	struct sctp_chunkhdr *ch;
 #if defined(INET) || defined(INET6)
 	struct udphdr *udp;
-	int ret;
+	int ret __unused;
 #endif
 	int len, cause_len, padding_len;
 #ifdef INET

Modified: head/sys/netinet/sctp_syscalls.c
==============================================================================
--- head/sys/netinet/sctp_syscalls.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/sctp_syscalls.c	Sat May 19 05:56:21 2018	(r333869)
@@ -91,7 +91,7 @@ static struct syscall_helper_data sctp_syscalls[] = {
 static void
 sctp_syscalls_init(void *unused __unused)
 {
-	int error;
+	int error __unused;
 
 	error = syscall_helper_register(sctp_syscalls, SY_THR_STATIC);
 	KASSERT((error == 0),

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/sctputil.c	Sat May 19 05:56:21 2018	(r333869)
@@ -72,7 +72,7 @@ extern const struct sctp_ss_functions sctp_ss_function
 void
 sctp_sblog(struct sockbuf *sb, struct sctp_tcb *stcb, int from, int incr)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.sb.stcb = stcb;
 	sctp_clog.x.sb.so_sbcc = sb->sb_cc;
@@ -93,7 +93,7 @@ sctp_sblog(struct sockbuf *sb, struct sctp_tcb *stcb, 
 void
 sctp_log_closing(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int16_t loc)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.close.inp = (void *)inp;
 	sctp_clog.x.close.sctp_flags = inp->sctp_flags;
@@ -117,7 +117,7 @@ sctp_log_closing(struct sctp_inpcb *inp, struct sctp_t
 void
 rto_logging(struct sctp_nets *net, int from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	memset(&sctp_clog, 0, sizeof(sctp_clog));
 	sctp_clog.x.rto.net = (void *)net;
@@ -134,7 +134,7 @@ rto_logging(struct sctp_nets *net, int from)
 void
 sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t tsn, uint16_t sseq, uint16_t stream, int from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.strlog.stcb = stcb;
 	sctp_clog.x.strlog.n_tsn = tsn;
@@ -154,7 +154,7 @@ sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t 
 void
 sctp_log_nagle_event(struct sctp_tcb *stcb, int action)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.nagle.stcb = (void *)stcb;
 	sctp_clog.x.nagle.total_flight = stcb->asoc.total_flight;
@@ -173,7 +173,7 @@ sctp_log_nagle_event(struct sctp_tcb *stcb, int action
 void
 sctp_log_sack(uint32_t old_cumack, uint32_t cumack, uint32_t tsn, uint16_t gaps, uint16_t dups, int from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.sack.cumack = cumack;
 	sctp_clog.x.sack.oldcumack = old_cumack;
@@ -192,7 +192,7 @@ sctp_log_sack(uint32_t old_cumack, uint32_t cumack, ui
 void
 sctp_log_map(uint32_t map, uint32_t cum, uint32_t high, int from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	memset(&sctp_clog, 0, sizeof(sctp_clog));
 	sctp_clog.x.map.base = map;
@@ -210,7 +210,7 @@ sctp_log_map(uint32_t map, uint32_t cum, uint32_t high
 void
 sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn, int from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	memset(&sctp_clog, 0, sizeof(sctp_clog));
 	sctp_clog.x.fr.largest_tsn = biggest_tsn;
@@ -229,7 +229,7 @@ sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new
 void
 sctp_log_mb(struct mbuf *m, int from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.mb.mp = m;
 	sctp_clog.x.mb.mbuf_flags = (uint8_t)(SCTP_BUF_GET_FLAGS(m));
@@ -265,7 +265,7 @@ sctp_log_mbc(struct mbuf *m, int from)
 void
 sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk, int from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	if (control == NULL) {
 		SCTP_PRINTF("Gak log of NULL?\n");
@@ -294,7 +294,7 @@ sctp_log_strm_del(struct sctp_queued_to_read *control,
 void
 sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.cwnd.net = net;
 	if (stcb->asoc.send_queue_cnt > 255)
@@ -329,7 +329,7 @@ sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets 
 void
 sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	memset(&sctp_clog, 0, sizeof(sctp_clog));
 	if (inp) {
@@ -373,7 +373,7 @@ sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb 
 void
 sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *net, int error, int burst, uint8_t from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	memset(&sctp_clog, 0, sizeof(sctp_clog));
 	sctp_clog.x.cwnd.net = net;
@@ -400,7 +400,7 @@ sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_n
 void
 sctp_log_rwnd(uint8_t from, uint32_t peers_rwnd, uint32_t snd_size, uint32_t overhead)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.rwnd.rwnd = peers_rwnd;
 	sctp_clog.x.rwnd.send_size = snd_size;
@@ -418,7 +418,7 @@ sctp_log_rwnd(uint8_t from, uint32_t peers_rwnd, uint3
 void
 sctp_log_rwnd_set(uint8_t from, uint32_t peers_rwnd, uint32_t flight_size, uint32_t overhead, uint32_t a_rwndval)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.rwnd.rwnd = peers_rwnd;
 	sctp_clog.x.rwnd.send_size = flight_size;
@@ -437,7 +437,7 @@ sctp_log_rwnd_set(uint8_t from, uint32_t peers_rwnd, u
 static void
 sctp_log_mbcnt(uint8_t from, uint32_t total_oq, uint32_t book, uint32_t total_mbcnt_q, uint32_t mbcnt)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.mbcnt.total_queue_size = total_oq;
 	sctp_clog.x.mbcnt.size_change = book;
@@ -465,7 +465,7 @@ sctp_misc_ints(uint8_t from, uint32_t a, uint32_t b, u
 void
 sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t wake_cnt, int from)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.wake.stcb = (void *)stcb;
 	sctp_clog.x.wake.wake_cnt = wake_cnt;
@@ -511,7 +511,7 @@ sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t wake_c
 void
 sctp_log_block(uint8_t from, struct sctp_association *asoc, size_t sendlen)
 {
-	struct sctp_cwnd_log sctp_clog;
+	struct sctp_cwnd_log sctp_clog __unused;
 
 	sctp_clog.x.blk.onsb = asoc->total_output_queue_size;
 	sctp_clog.x.blk.send_sent_qcnt = (uint16_t)(asoc->send_queue_cnt + asoc->sent_queue_cnt);

Modified: head/sys/netinet/siftr.c
==============================================================================
--- head/sys/netinet/siftr.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/siftr.c	Sat May 19 05:56:21 2018	(r333869)
@@ -1201,10 +1201,10 @@ siftr_manage_ops(uint8_t action)
 	struct timeval tval;
 	struct flow_hash_node *counter, *tmp_counter;
 	struct sbuf *s;
-	int i, key_index, ret, error;
+	int i, key_index, error;
 	uint32_t bytes_to_write, total_skipped_pkts;
 	uint16_t lport, fport;
-	uint8_t *key, ipver;
+	uint8_t *key, ipver __unused;
 
 #ifdef SIFTR_IPV6
 	uint32_t laddr[4];
@@ -1235,7 +1235,7 @@ siftr_manage_ops(uint8_t action)
 
 		siftr_exit_pkt_manager_thread = 0;
 
-		ret = kthread_add(&siftr_pkt_manager_thread, NULL, NULL,
+		kthread_add(&siftr_pkt_manager_thread, NULL, NULL,
 		    &siftr_pkt_manager_thr, RFNOWAIT, 0,
 		    "siftr_pkt_manager_thr");
 

Modified: head/sys/netinet/tcp_timewait.c
==============================================================================
--- head/sys/netinet/tcp_timewait.c	Sat May 19 05:55:31 2018	(r333868)
+++ head/sys/netinet/tcp_timewait.c	Sat May 19 05:56:21 2018	(r333869)
@@ -645,7 +645,7 @@ tcp_tw_2msl_stop(struct tcptw *tw, int reuse)
 {
 	struct ucred *cred;
 	struct inpcb *inp;
-	int released;
+	int released __unused;
 
 	INP_INFO_RLOCK_ASSERT(&V_tcbinfo);
 


More information about the svn-src-head mailing list