From nobody Sun Jul 24 11:02:15 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 4LrKxz2yNmz4XXML; Sun, 24 Jul 2022 11:02:15 +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 4LrKxz2LsFz3cVK; Sun, 24 Jul 2022 11:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660535; 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=AN+H11dH+ECGNZMf4EbgZB2a114B0UI0t0vkpzVNuro=; b=lEQL4uXHRKqafMRCsyREEq2j/nRpV0oTd0P4YSaBqpsizTWe9PO5MdAHkns/U1iznycg34 p1Oqu1ljzxUpND33683zOhqfTb5/8xxqR52FTHty0xwMv5uSdOnaPONGiRS7Sb/eTs4Bc3 Hmi69LZvbJSCvHYCJajV9V2i/wxvXG/w+n0ti2pKLXa0ikAtqXbkI/RlMsOdWPYmDWoGbm cBxJkUneBKTMnVCUTK1yVSrp6564NnoxM/6kDoXHrLHpw/Ku3LSrv1tBvuPvA4/Rcn4kz9 eGq/GxBXI4nUBJh9NmhV6mxqNjmp0unWhzyF3F4PnPeFXMUOmQqee5vHvWjFKA== 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 4LrKxz1RWBzGm7; Sun, 24 Jul 2022 11:02:15 +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 26OB2FVL041283; Sun, 24 Jul 2022 11:02:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26OB2Fiv041282; Sun, 24 Jul 2022 11:02:15 GMT (envelope-from git) Date: Sun, 24 Jul 2022 11:02:15 GMT Message-Id: <202207241102.26OB2Fiv041282@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: 0f55ecc86ee5 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 0f55ecc86ee5e7609a8208ef6cd09147450e0d9c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660535; 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=AN+H11dH+ECGNZMf4EbgZB2a114B0UI0t0vkpzVNuro=; b=cCpw+LnAx+0ee8Wpa8la7NG7QXposqoa9uUXUSXETynFgFs0EQ9pepryhmqT0VajK5MWOq s5+ZaR2SG7eTqj9mmBl79JJeqKwiPTekhwPOHDDh4siD/8gr73JqPSDgS5RuFfcxoA0mvw 54md9tpLHYc0Ep8Xu3TFJxI1XHLlZmx1UrZ2PHNGgBlYb333qWOJrW4srHQ5ENOJorwNOG tM+MThhVZK8ltR2VvW8mWv/Jy3IEF67HtNX4HfsUMXn8/3QUhEh8sExa/6dUrES8jSaXjk EEovcAMnFSCratuz4w4XUXvRIrhXJ8s0QBpDjGhBjVsstRUQS89hAOC011xaHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658660535; a=rsa-sha256; cv=none; b=qyn3qzzKMec5M0mRmzn+NKJl7xGS0in1lrVtuNUKhLvc4j5DmbKGC05HcrINRRpNX8Lvar 74EDtuiHOVgTq4kV/lmxEqhgJjjKwCHZAXT5yt271mNnADfwc4UqQwnMJmX1GKYL+vM6lw nnm6KvQRHraxVi+5mKkMBLbxeT4S8y54BxtxDJhrwGOC2TD3vJ8PmWt16R0CBtdGRaygqE pmTKNMAi7TseDq0uYdDjGuQWacWdE61sjAJowjWWBzLSdFLbc3DnLmLqqwU6ZZy+cfTOz1 tbcSQzUOpTi8mB69Ch1t2AcNSJKCdUqRHm7wmOiOsqaz/4ai0l9hWK5+r4C1Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0f55ecc86ee5e7609a8208ef6cd09147450e0d9c commit 0f55ecc86ee5e7609a8208ef6cd09147450e0d9c Author: Dimitry Andric AuthorDate: 2022-07-21 20:03:50 +0000 Commit: Dimitry Andric CommitDate: 2022-07-24 11:01:18 +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;