From nobody Sun Aug 14 19:27:57 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 4M5S9n6vb3z4YvJ8; Sun, 14 Aug 2022 19:27:57 +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 4M5S9n6Kfmz3M5l; Sun, 14 Aug 2022 19:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660505277; 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=odyIEWNtL6m7pkZxf1bh3mhtkWwlvpOcbMZvQTAA520=; b=kButaP9ydyXQQHJ1Ab97E6QTWgnNto295ejRIFxbhTRTLcTsEViZISVgtsZCBoHbfSMcGs z0hxvNG7ZEASIJy95aicpbpFEUUXfCLWnye6hp6FrdbsEsmpTBn97T7a4UdIR8I+5Drtt/ tJaQ8jCc+rDSdu6+RbPS59K/Ak/7guPj3liLnHEWTZs1rBnAjUKkfNNTDqtzPxVILQFsNz 23EkmWu0EmdpjZuiwtqdoLRcU/JJVa3IUGCjdbce75UW57PY3sAHXKrXC+zsdYeJipieXM CB8IJkVy2pdQYN+wTk5BO18dpt0B8TSFCfY+qKGlje2iuVWgnYGHdVTO5zGlBQ== 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 4M5S9n5QBgz12gC; Sun, 14 Aug 2022 19:27:57 +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 27EJRvcX044364; Sun, 14 Aug 2022 19:27:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27EJRvoA044363; Sun, 14 Aug 2022 19:27:57 GMT (envelope-from git) Date: Sun, 14 Aug 2022 19:27:57 GMT Message-Id: <202208141927.27EJRvoA044363@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: e967183cb030 - main - Fix unused variable warning in tcp_stacks's rack.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: e967183cb030dfc349c264520e5710bac70bcdd4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660505277; 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=odyIEWNtL6m7pkZxf1bh3mhtkWwlvpOcbMZvQTAA520=; b=u16M4M254sXbLhiYJoF6ckk2uVr1KfLkLXVzS5veF0kwNH7zrTbx/k1yzLsPa1E58E3N9x sw9HDxbihkYwgguMs0t6GhOkiXzlstthbO2JEodwDBoIIRVck8n3Z6cLx2HjCDQxbPjL/T tiorNwmo5p7dFPvFIJA1g1+jRFj8jKLxQfN4/5497NP+6YVYwjn0MLNTl6qvdkTqi19ToH VirairtSOy4/8DU01TrKRwrrmjgg75JL/TGCxbyfHUHhd2Jseko5aMmU4at8CvHgR2S88Z p5CL1s1iszp1Lz5KEOaW/7aRTPh1Qq/w6bwDJFCvOqjyXxYeXY3q/eHdDPoNJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660505277; a=rsa-sha256; cv=none; b=yY6TXHY6F4N4XjP8/oe79+VHFf8iL0zvPmHyuzbRSdihM8q2wYWcrZBzFiXilKT3aCl+U4 MSUUrVLS+rLinVpGxcCzh4O8sU3q9ORG5vOtfrrNno3NWzOU7MeSNSAyC10ncOJN/c8Cdw l58KJVcEfniLxr0s9vDjjbMlsNTLYrUd4CbGK4PQ4FrWPk3HfpDLo6NuHd5WB5mHMARx1c OcLSeZNRv7JC1kIKzWY8iKfuf7YVvgKRszgJovGA1e+KmMLdjxss4diJ3+0PVuMca0GRsG yz2MtUj5iOCRjM2vKaIY2BrQvobRIycUrf8Zq7ctk+4Vu0JoNQ8kXeUxNLBJlA== 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=e967183cb030dfc349c264520e5710bac70bcdd4 commit e967183cb030dfc349c264520e5710bac70bcdd4 Author: Dimitry Andric AuthorDate: 2022-08-14 19:13:40 +0000 Commit: Dimitry Andric CommitDate: 2022-08-14 19:27:34 +0000 Fix unused variable warning in tcp_stacks's rack.c With clang 15, the following -Werror warning is produced: sys/netinet/tcp_stacks/rack.c:16148:6: error: variable 'cnt_thru' set but not used [-Werror,-Wunused-but-set-variable] int cnt_thru = 1; ^ The 'cnt_thru' variable is only used when TCP_ACCOUNTING is defined. Ensure it is only declared and set in that case. MFC after: 3 days --- sys/netinet/tcp_stacks/rack.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index c3008b38dd4f..0cb7b5cb4680 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -16145,7 +16145,9 @@ rack_fast_output(struct tcpcb *tp, struct tcp_rack *rack, uint64_t ts_val, struct tcpopt to; u_char opt[TCP_MAXOLEN]; uint32_t hdrlen, optlen; +#ifdef TCP_ACCOUNTING int cnt_thru = 1; +#endif int32_t slot, segsiz, len, max_val, tso = 0, sb_offset, error, ulen = 0; uint16_t flags; uint32_t s_soff; @@ -16503,7 +16505,9 @@ again: max_val -= len; len = segsiz; th = rack->r_ctl.fsb.th; +#ifdef TCP_ACCOUNTING cnt_thru++; +#endif goto again; } tp->t_flags &= ~(TF_ACKNOW | TF_DELACK);