From nobody Thu Jul 21 20:12:09 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 4LpkHt0Dykz4XR7C; Thu, 21 Jul 2022 20:12:10 +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 4LpkHs6f6lz3hfS; Thu, 21 Jul 2022 20:12:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658434329; 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=T3mp5qTMjONVdugtcZootdr2qh1r5c4lG/caNONz4Tc=; b=lj4DNJTIdhzgSQOHXWbiOLD4ucZVCjaNIHmGpKSiCZOMjshEmSu3oEE/ypb6zvQHG1iiVW u2jUPEKxtGzWNvs7mog2JDBNt+oagKp1a/Y58znENWUWGYuQ831JyrmQdvAnRkzU/oSAu0 qeVmY4dCVaQCeq4iK0HGpYoDRkcvlA836Ln9Fh4WnmWBuId3QVBRLIUpAF92h1+evY+WsC rSnYBPzaY7z+RIZ2/4ykYnW9vBx1FR2PA6lspXDcchbmS9fBXvmW+vTLfKU2TeGByK+s6K dOW5nFpviGOuxeAMcWy99bPoxmTwF+I9DB4h9Bvi3KdXYmoMBsGv0bYIohlh7g== 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 4LpkHs5hm9zZHb; Thu, 21 Jul 2022 20:12:09 +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 26LKC9T0035278; Thu, 21 Jul 2022 20:12:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26LKC9DG035277; Thu, 21 Jul 2022 20:12:09 GMT (envelope-from git) Date: Thu, 21 Jul 2022 20:12:09 GMT Message-Id: <202207212012.26LKC9DG035277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: df5d2841d507 - main - 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/main X-Git-Reftype: branch X-Git-Commit: df5d2841d507589af0de7301f6cee3d2b98a35be Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658434329; 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=T3mp5qTMjONVdugtcZootdr2qh1r5c4lG/caNONz4Tc=; b=nMBP+a1RBJX3MOA/9gqg+1/xy8u47wiWTfk5MKGZB8EBY7a3X6ol4TsE1vHtX0D7ytvlcw V6pUQCIm5YZpuaDqeBJa80n7xEx6ECIjk0CyRgxzEb1zPeaiLYdbp157Y0oUK3R/L02xQ+ uEy0k3tEdIIrvlUybAbV9HrUL98fwVDGP0V2cDCjHqzRir0oArP22Pef47uJhtHz2ktrCi wQ43FnN1mzljuQwXcc1Ej+Cq9Bsm9LxRQUcwJRJ0XX4wl38zgEpbasL3VZ9Vwg499izBvQ 6cduG+dI+9V6omMqqwEpl/97wvbjjL3e1hLi/X1gDGpTbhN7UX+Zu1cP0+Y1UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658434329; a=rsa-sha256; cv=none; b=fIPm5l77SSG+7caYeOWzg0kYnYzABVNE0kcsCNVqaXDW0/xZI4RDac4ZqbljeANVVewSiW u7U0ezaqcC6nDacHHI9rhhtKIW8n5OQJM6J4q6Vf4K72wpYaGBrImUyS5f67jiz8oi+Cvg mV05tK803RSFOQRVerAV4kdM3B2DMY/JwI6ti59vR44Xz1Gxcov4luv3PDu+svU3lCz7WZ 8G8zNqdDCCVM/d2+sWbCisOjn8tb0aA0dByf9lRd28vwuTsQtbK1owKSWZZHzFrkVdVjHi p8kFdVCS7LHXqgLlbRGotkrtiTheTs7qHfZE+/1IPpgrvlVl0mFMDowvweLysw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=df5d2841d507589af0de7301f6cee3d2b98a35be commit df5d2841d507589af0de7301f6cee3d2b98a35be Author: Dimitry Andric AuthorDate: 2022-07-21 20:03:50 +0000 Commit: Dimitry Andric CommitDate: 2022-07-21 20:12:01 +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 --- 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;