From nobody Sun Jul 24 11:01:39 2022 X-Original-To: dev-commits-src-all@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 4LrKxH3rDHz4XX8Z; Sun, 24 Jul 2022 11:01:39 +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 4LrKxH2B8Qz3Yyv; Sun, 24 Jul 2022 11:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660499; 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=Usffr20zpxZ8X4bnLtbReNruK4w97PStSIL7W5XTCZ0=; b=xt9GYLt+WjuyeaPbudz5TlWtLXE/3yz/CIutuD1/rzqQiL3gPsXOvAlnM5nTeOPjUVDKWZ 5MyMfGtDyJkaGmQ9KPNmPvRTbls54ssOlpNoqoJJnUyBNMGBVv+QrsvfuXAqOg9pqdm52x BZuJeAqa6VjoqlDB9EJe/6KNrSgxmJbX2+/CZg0DCGsyIj28ReYPuVGkvdsKS9GBMUJUlh 6rD9AvwQZv4fVmNQwGfQHBtmDpzY+0MSJlYDKiPf2q38CCSZ1M1KwahSE49KPafD4UcrlM xXiYuiqEVZfDI8s9Mu3ltoo3C5UV43QkMKOXSfeTogJ/ghutw/ES/guyoHP0yQ== 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 4LrKxH1FFLzGH2; Sun, 24 Jul 2022 11:01:39 +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 26OB1d5G040571; Sun, 24 Jul 2022 11:01:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26OB1dOb040570; Sun, 24 Jul 2022 11:01:39 GMT (envelope-from git) Date: Sun, 24 Jul 2022 11:01:39 GMT Message-Id: <202207241101.26OB1dOb040570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a74dd993696d - stable/13 - Fix unused variable warning in ipsec_mbuf.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a74dd993696d38a0164560ef2e38dc0f0ffb8ee7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660499; 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=Usffr20zpxZ8X4bnLtbReNruK4w97PStSIL7W5XTCZ0=; b=qcwUc3tOSvcmtU7+UqzdNsnKoXZ3qng9E+CppHEFKVocia6UuYS9QXZ3lAs+VHk6biXhXs MAtH5Rz+Yw8Z04Jnw5Uq8eboERzOhDoWc26vwjZL5y6YkMnQZo0xRRvYLq0UiBJOnekiYA 7pZnL6bKwZjCC6OSHqt4W7AkDR4TUsu3DkGdMMej4EaHqf2sELg7WumsfyjLjDSrZOaJBa lfZs9qvsa/DDIe4YRGWasHq30NVrxJ1X7f0wKH8rgLs1AbEjBFMFUrXUOMWxATp2LJES1M LXOEFglHTmYHOBn5dzt51NR4fcGdy5/X//x7Ca1eEZ69lR+AFORY+CSJpaIFtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658660499; a=rsa-sha256; cv=none; b=NbrGS2T28IVl7jOkyyfXQ/JjQiNFGXCL3S4Di5wt3YneAkg4eZVrg6Zq3wzXkYWiKNHcwT sqbYj2IocNdsnxblOzkQENZjGrRmNhpFJJ3/9sUhG3pOS8mWRVL/EhB6BPFKVV6nUUpzF2 j+Sz1B3mhjU5F1TgHwZTu6nUp4xA7qRN0nzvOg1wNrBIgszfBN62q+w6e9FNGH7mkrplz1 uHQI2/X0FOCRerM7OyxIDtk28DE1DWssOUUSqXiblGuNtMXN1EOjtuCfflmQzfPdESZVTR 2/ftWta/uVZvDRl8XT9k2gmMhQvTmWl/pbX4EtS+Sm5a2RDVZkpVl5YZTdeiDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a74dd993696d38a0164560ef2e38dc0f0ffb8ee7 commit a74dd993696d38a0164560ef2e38dc0f0ffb8ee7 Author: Dimitry Andric AuthorDate: 2022-07-21 20:03:50 +0000 Commit: Dimitry Andric CommitDate: 2022-07-24 11:00:06 +0000 Fix unused variable warning in ipsec_mbuf.c With clang 15, the following -Werror warning is produced: sys/netipsec/ipsec_mbuf.c:93:24: error: variable 'alloc' set but not used [-Werror,-Wunused-but-set-variable] int todo, len, done, alloc; ^ The 'alloc' variable appears to have been a debugging aid that has never been used for anything, so remove it. MFC after: 3 days (cherry picked from commit df5d2841d507589af0de7301f6cee3d2b98a35be) --- sys/netipsec/ipsec_mbuf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netipsec/ipsec_mbuf.c b/sys/netipsec/ipsec_mbuf.c index 170728f91bde..75aa8cae5a31 100644 --- a/sys/netipsec/ipsec_mbuf.c +++ b/sys/netipsec/ipsec_mbuf.c @@ -90,11 +90,10 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off) *off = skip; } else if (hlen > M_TRAILINGSPACE(m)) { struct mbuf *n0, *n, **np; - int todo, len, done, alloc; + int todo, len, done; n0 = NULL; np = &n0; - alloc = 0; done = 0; todo = remain; while (todo > 0) { @@ -112,7 +111,6 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off) } *np = n; np = &n->m_next; - alloc++; len = min(todo, len); memcpy(n->m_data, mtod(m, char *) + skip + done, len); n->m_len = len; @@ -134,7 +132,6 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off) m_freem(n0); return NULL; } - alloc++; if ((n->m_next = n0) == NULL) np = &n->m_next;