From nobody Tue Jun 27 17:19:41 2023 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 4QrBKV27RSz4f4Fy; Tue, 27 Jun 2023 17:19:42 +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 4QrBKT72fDz3NBw; Tue, 27 Jun 2023 17:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886382; 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=RDN2tMMyeFTdrunFbQl0Vk1UBICDywIV8a4bFBiGgis=; b=yN1NJ4UQSjvG2OQum5Xl7YuLyjNv6cigiA26OVQ3TIdD2etGuz/dBTXSBIPPWwJFx7iVgc OdJfN/HXxcTP+pgFuyNP3Mf7IU8qcjUugotzwNRfUyp4Yt8qH8tg1vm0p7Izq/m3spk0ZO Q6tmJE6iYtcsVzDFXa3xVDxmiRGdXQE/PtWBIYjTUVSW7S4y3/MTKNgF/sg6RreJwYSqFO 90O6IiK7DB2Lqb/rp8IWK4+rNJbAjsk5w+zzG0M4LlqXAt6NGJ0Q6vWg+5Rr1Yc1AUFLUg sfdJcrfwLKiiueIDFtUxseDsEkZlliUC0UNxf/5qxjcQTlGDl3zScJ/ulSoIUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886382; 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=RDN2tMMyeFTdrunFbQl0Vk1UBICDywIV8a4bFBiGgis=; b=OBOZmjA1BtUCO/55IyINXDn/nhDaZ1Xm/j26sl5hPcerz8OXict72fikcGbaX3pTrjZiSm A5TY4aTXZNL2Nydfb9Puw5PVS1dM5c/+8k1H02xHlrIi+SNm+11abzbM4M7M11KezDc23X knldHoB+A5SfOv+l+/ev86o5RKWdVjK8QI4dmJX85UPAPro8a+jqXDPj6zEVDFlps8Ibn2 WOYswFTPSouwZorVgQa/C9iRxIQA/BvAs0CpoJ1bMkVcZkfxl7nfu2PROeYhe+e/V1OVQH qHSi7rD23MaQQVdnsLtP8fT9CYYoKMpCS4PI6oV77JFpbKNaiZBHooTCsD9Ezg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886382; a=rsa-sha256; cv=none; b=Jg5Dt33qjnosnO16xqU/qZezgyVa1yWV2YlIVrDyH3m9QiZ23knDu05H6mfDG0aORtZwa4 GjukuTnHwR3iezHEolcsP4AOFW+h8QrpFIsxOtdRiBol2xi9fmVZvSx/zrqAIBBiZsR3Lq 6lVob2vFBTRaIC9fhanqpqF7m9bXmfQfwVurXaHkHwGwk/4ivdo5kINm4bNHbav6ovF3h7 Mu0wQw6Y6fA5R+vCqgx6QE4CwWjGInMwwzlxD3rSfClGCK3rN3nm/d1/6rwNTI8GxTV5OF vLOAYPIioiDCAX5/ixyUb/VB6+09xOZX14tiqXSaT0Z8vXXDEb7SLiJzK84I5g== 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 4QrBKT1mptz10mt; Tue, 27 Jun 2023 17:19:41 +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 35RHJfoU006829; Tue, 27 Jun 2023 17:19:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJfD5006828; Tue, 27 Jun 2023 17:19:41 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:41 GMT Message-Id: <202306271719.35RHJfD5006828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f5e73306336f - main - ipfw: Remove set but unused variables. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5e73306336f22b842da143f973f08c5dcd13671 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f5e73306336f22b842da143f973f08c5dcd13671 commit f5e73306336f22b842da143f973f08c5dcd13671 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 ipfw: Remove set but unused variables. Reported by: GCC Differential Revision: https://reviews.freebsd.org/D40654 --- sbin/ipfw/nat.c | 3 +-- sbin/ipfw/nat64clat.c | 3 +-- sbin/ipfw/nat64lsn.c | 3 +-- sbin/ipfw/nat64stl.c | 3 +-- sbin/ipfw/nptv6.c | 3 +-- sbin/ipfw/tables.c | 6 ++---- 6 files changed, 7 insertions(+), 14 deletions(-) diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index 1076e1038b8a..2be03f47c229 100644 --- a/sbin/ipfw/nat.c +++ b/sbin/ipfw/nat.c @@ -1074,7 +1074,6 @@ nat_foreach(nat_cb_t *f, void *arg, int sort) struct nat44_cfg_nat *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(struct nat44_cfg_nat); @@ -1097,7 +1096,7 @@ nat_foreach(nat_cb_t *f, void *arg, int sort) cfg = (struct nat44_cfg_nat*)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, arg); /* Ignore errors for now */ + (void)f(cfg, arg); /* Ignore errors for now */ cfg = (struct nat44_cfg_nat *)((caddr_t)cfg + olh->objsize); } diff --git a/sbin/ipfw/nat64clat.c b/sbin/ipfw/nat64clat.c index 08be444318cc..bd286f78cfc2 100644 --- a/sbin/ipfw/nat64clat.c +++ b/sbin/ipfw/nat64clat.c @@ -505,7 +505,6 @@ nat64clat_foreach(nat64clat_cb_t *f, const char *name, uint8_t set, int sort) ipfw_nat64clat_cfg *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(*cfg); @@ -528,7 +527,7 @@ nat64clat_foreach(nat64clat_cb_t *f, const char *name, uint8_t set, int sort) cfg = (ipfw_nat64clat_cfg *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, name, set); /* Ignore errors for now */ + (void)f(cfg, name, set); /* Ignore errors for now */ cfg = (ipfw_nat64clat_cfg *)((caddr_t)cfg + olh->objsize); } diff --git a/sbin/ipfw/nat64lsn.c b/sbin/ipfw/nat64lsn.c index 755414f49959..f005432d7fbc 100644 --- a/sbin/ipfw/nat64lsn.c +++ b/sbin/ipfw/nat64lsn.c @@ -853,7 +853,6 @@ nat64lsn_foreach(nat64lsn_cb_t *f, const char *name, uint8_t set, int sort) ipfw_nat64lsn_cfg *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(ipfw_nat64lsn_cfg); @@ -877,7 +876,7 @@ nat64lsn_foreach(nat64lsn_cb_t *f, const char *name, uint8_t set, int sort) cfg = (ipfw_nat64lsn_cfg *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, name, set); /* Ignore errors for now */ + (void)f(cfg, name, set); /* Ignore errors for now */ cfg = (ipfw_nat64lsn_cfg *)((caddr_t)cfg + olh->objsize); } diff --git a/sbin/ipfw/nat64stl.c b/sbin/ipfw/nat64stl.c index def9b9dd9b58..8ac0b546a44d 100644 --- a/sbin/ipfw/nat64stl.c +++ b/sbin/ipfw/nat64stl.c @@ -521,7 +521,6 @@ nat64stl_foreach(nat64stl_cb_t *f, const char *name, uint8_t set, int sort) ipfw_nat64stl_cfg *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(*cfg); @@ -544,7 +543,7 @@ nat64stl_foreach(nat64stl_cb_t *f, const char *name, uint8_t set, int sort) cfg = (ipfw_nat64stl_cfg *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, name, set); /* Ignore errors for now */ + (void)f(cfg, name, set); /* Ignore errors for now */ cfg = (ipfw_nat64stl_cfg *)((caddr_t)cfg + olh->objsize); } diff --git a/sbin/ipfw/nptv6.c b/sbin/ipfw/nptv6.c index f2ebbdb65185..27b6d3945d26 100644 --- a/sbin/ipfw/nptv6.c +++ b/sbin/ipfw/nptv6.c @@ -420,7 +420,6 @@ nptv6_foreach(nptv6_cb_t *f, const char *name, uint8_t set, int sort) ipfw_nptv6_cfg *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(*cfg); @@ -442,7 +441,7 @@ nptv6_foreach(nptv6_cb_t *f, const char *name, uint8_t set, int sort) cfg = (ipfw_nptv6_cfg *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, name, set); + (void)f(cfg, name, set); cfg = (ipfw_nptv6_cfg *)((caddr_t)cfg + olh->objsize); } free(olh); diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c index 37cbd7a2d7ae..d4fc770d375e 100644 --- a/sbin/ipfw/tables.c +++ b/sbin/ipfw/tables.c @@ -1408,7 +1408,6 @@ guess_key_type(char *key, uint8_t *ptype) { char *p; struct in6_addr addr; - uint32_t kv; if (ishexnumber(*key) != 0 || *key == ':') { /* Remove / if exists */ @@ -1424,7 +1423,7 @@ guess_key_type(char *key, uint8_t *ptype) } else { /* Port or any other key */ /* Skip non-base 10 entries like 'fa1' */ - kv = strtol(key, &p, 10); + (void)strtol(key, &p, 10); if (*p == '\0') { *ptype = IPFW_TABLE_NUMBER; return (0); @@ -1712,7 +1711,6 @@ tables_foreach(table_cb_t *f, void *arg, int sort) ipfw_xtable_info *info; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(ipfw_xtable_info); @@ -1737,7 +1735,7 @@ tables_foreach(table_cb_t *f, void *arg, int sort) info = (ipfw_xtable_info *)(olh + 1); for (i = 0; i < olh->count; i++) { if (g_co.use_set == 0 || info->set == g_co.use_set - 1) - error = f(info, arg); + (void)f(info, arg); info = (ipfw_xtable_info *)((caddr_t)info + olh->objsize); }