From nobody Sat Dec 18 13:21:24 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C1EEF18E0064; Sat, 18 Dec 2021 13:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JGRM83vBqz3LWn; Sat, 18 Dec 2021 13:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6630B103A7; Sat, 18 Dec 2021 13:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BIDLOdd042561; Sat, 18 Dec 2021 13:21:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BIDLOOO042560; Sat, 18 Dec 2021 13:21:24 GMT (envelope-from git) Date: Sat, 18 Dec 2021 13:21:24 GMT Message-Id: <202112181321.1BIDLOOO042560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 60a28b091651 - main - ipfw: plug set-but-not-used vars List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60a28b091651d7cdea9d57862d2535c1f33c4be3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639833684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eNYcRdqDJ6Zi/t/KthvmSHiTrWp6W0eYWEV6J6ZnrA=; b=L+owSJFwfPP6BJDiYhkBUxa4ujfabavFNW+wzDn9tD61+VqXCB8PiSMbjGIeu6dKsrq/xZ kwmXsYBS8Gs4iDHkwHdZGaFgYcizRxo9w5yERA6UC7H/DUUy4Avq+qmUT68wortJjtpr0y 1FzSqx2LzDJmeIQj6FojNH3GZCDrPmwEkdQVe8dvsgj5VrvGEJNSTvyD9KJt+DsCUsUrpd 7v056eMsRGXwDwEmddIpB49OGPwSSqrSZYuR6ShPvlgr7TrqvjVRJyTdWSjOBSO2PFGzMr 0KgJ57xRNZSOrfZE+RGcum5ub9p6jUdfS3Y2z8ZfXgNMmnvEbA/lMu+fdqrOqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639833684; a=rsa-sha256; cv=none; b=b/CiYrqqeHRfcPJOca1a95ESBOVRWsCJ06yBTTbDD+y6+CMfYygQwmB/hGO9j3GN5yzohq 9Vr2uvJKL4hpiIZLp5DhCha6FaSRGB/LOTHOiMzThfkMI0IYes1BEvC0UV1TRfUauBJww3 e7/SjtGEtNhVQ5WD2Ooi14jG9/LGo92ay5E1nTP5P4AF+ntkNSh+N+95I9bm33JYy7+EYO fQ1ZgPGiMXzwyE99WmzXQi83rK1GjWDRrb3vuNGLe0332Fv6aBGimteHMLHWjxtx94t88Y qKtM6DocC3iUyhMk9RCULW0/apJKBnAoJ+O/x3GlatiPNbvomFEFUq/EIklB+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=60a28b091651d7cdea9d57862d2535c1f33c4be3 commit 60a28b091651d7cdea9d57862d2535c1f33c4be3 Author: Mateusz Guzik AuthorDate: 2021-12-18 13:21:03 +0000 Commit: Mateusz Guzik CommitDate: 2021-12-18 13:21:03 +0000 ipfw: plug set-but-not-used vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/ipfw/ip_fw_sockopt.c | 6 +----- sys/netpfil/ipfw/ip_fw_table.c | 7 +++---- sys/netpfil/ipfw/ip_fw_table_algo.c | 16 ++++------------ 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c index ee057b4d8346..2658c371091d 100644 --- a/sys/netpfil/ipfw/ip_fw_sockopt.c +++ b/sys/netpfil/ipfw/ip_fw_sockopt.c @@ -2833,7 +2833,6 @@ rewrite_rule_uidx(struct ip_fw_chain *chain, struct rule_check_info *ci) { int error; ipfw_insn *cmd; - uint8_t type; struct obj_idx *p, *pidx_first, *pidx_last; struct tid_info ti; @@ -2850,7 +2849,6 @@ rewrite_rule_uidx(struct ip_fw_chain *chain, struct rule_check_info *ci) M_IPFW, M_WAITOK | M_ZERO); error = 0; - type = 0; memset(&ti, 0, sizeof(ti)); /* Use set rule is assigned to. */ @@ -3792,7 +3790,7 @@ ipfw_ctl(struct sockopt *sopt) { #define RULE_MAXSIZE (512*sizeof(u_int32_t)) int error; - size_t size, valsize; + size_t size; struct ip_fw *buf; struct ip_fw_rule0 *rule; struct ip_fw_chain *chain; @@ -3804,8 +3802,6 @@ ipfw_ctl(struct sockopt *sopt) chain = &V_layer3_chain; error = 0; - /* Save original valsize before it is altered via sooptcopyin() */ - valsize = sopt->sopt_valsize; opt = sopt->sopt_name; /* diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c index 6d472029c4bd..19bedbbe9b50 100644 --- a/sys/netpfil/ipfw/ip_fw_table.c +++ b/sys/netpfil/ipfw/ip_fw_table.c @@ -355,7 +355,7 @@ rollback_added_entries(struct ip_fw_chain *ch, struct table_config *tc, struct tentry_info *ptei; caddr_t v, vv; size_t ta_buf_sz; - int error, i; + int error __diagused, i; uint32_t num; IPFW_UH_WLOCK_ASSERT(ch); @@ -482,7 +482,7 @@ flush_batch_buffer(struct ip_fw_chain *ch, struct table_algo *ta, static void rollback_add_entry(void *object, struct op_state *_state) { - struct ip_fw_chain *ch; + struct ip_fw_chain *ch __diagused; struct tableop_state *ts; ts = (struct tableop_state *)_state; @@ -1537,7 +1537,7 @@ roundup2p(uint32_t v) int ipfw_resize_tables(struct ip_fw_chain *ch, unsigned int ntables) { - unsigned int ntables_old, tbl; + unsigned int tbl; struct namedobj_instance *ni; void *new_idx, *old_tablestate, *tablestate; struct table_info *ti; @@ -1583,7 +1583,6 @@ ipfw_resize_tables(struct ip_fw_chain *ch, unsigned int ntables) ch->tablestate = tablestate; ipfw_objhash_bitmap_swap(ni, &new_idx, &new_blocks); - ntables_old = V_fw_tables_max; V_fw_tables_max = ntables; IPFW_WUNLOCK(ch); diff --git a/sys/netpfil/ipfw/ip_fw_table_algo.c b/sys/netpfil/ipfw/ip_fw_table_algo.c index 25a4ae1d6a0b..cc5cba386ace 100644 --- a/sys/netpfil/ipfw/ip_fw_table_algo.c +++ b/sys/netpfil/ipfw/ip_fw_table_algo.c @@ -2279,11 +2279,8 @@ static int ta_prepare_del_ifidx(struct ip_fw_chain *ch, struct tentry_info *tei, void *ta_buf) { - struct ta_buf_ifidx *tb; char *ifname; - tb = (struct ta_buf_ifidx *)ta_buf; - /* Check if string is terminated */ ifname = (char *)tei->paddr; if (strnlen(ifname, IF_NAMESIZE) == IF_NAMESIZE) @@ -2305,7 +2302,7 @@ ta_del_ifidx(void *ta_state, struct table_info *ti, struct tentry_info *tei, struct ta_buf_ifidx *tb; char *ifname; uint16_t ifindex; - int res; + int res __diagused; tb = (struct ta_buf_ifidx *)ta_buf; ifname = (char *)tei->paddr; @@ -2371,7 +2368,7 @@ if_notifier(struct ip_fw_chain *ch, void *cbdata, uint16_t ifindex) struct ifidx ifi; struct iftable_cfg *icfg; struct table_info *ti; - int res; + int res __diagused; ife = (struct ifentry *)cbdata; icfg = ife->icfg; @@ -2781,7 +2778,7 @@ ta_add_numarray(void *ta_state, struct table_info *ti, struct tentry_info *tei, struct numarray_cfg *cfg; struct ta_buf_numarray *tb; struct numarray *ri; - int res; + int res __diagused; uint32_t value; tb = (struct ta_buf_numarray *)ta_buf; @@ -2831,7 +2828,7 @@ ta_del_numarray(void *ta_state, struct table_info *ti, struct tentry_info *tei, struct numarray_cfg *cfg; struct ta_buf_numarray *tb; struct numarray *ri; - int res; + int res __diagused; tb = (struct ta_buf_numarray *)ta_buf; cfg = (struct numarray_cfg *)ta_state; @@ -2981,11 +2978,8 @@ static int ta_find_numarray_tentry(void *ta_state, struct table_info *ti, ipfw_obj_tentry *tent) { - struct numarray_cfg *cfg; struct numarray *ri; - cfg = (struct numarray_cfg *)ta_state; - ri = numarray_find(ti, &tent->k.key); if (ri != NULL) { @@ -3343,7 +3337,6 @@ static int ta_dump_fhash_tentry(void *ta_state, struct table_info *ti, void *e, ipfw_obj_tentry *tent) { - struct fhash_cfg *cfg; struct fhashentry *ent; struct fhashentry4 *fe4; #ifdef INET6 @@ -3351,7 +3344,6 @@ ta_dump_fhash_tentry(void *ta_state, struct table_info *ti, void *e, #endif struct tflow_entry *tfe; - cfg = (struct fhash_cfg *)ta_state; ent = (struct fhashentry *)e; tfe = &tent->k.flow;