From nobody Fri Jul 29 18:47:07 2022 X-Original-To: dev-commits-src-branches@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 4Lvc242Rfsz4Y1bw; Fri, 29 Jul 2022 18:47:08 +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 4Lvc241bjKz3nMv; Fri, 29 Jul 2022 18:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120428; 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=h/qSRWjwJeGI2Y2lRxE3gdTfXTfvA5TRNs5QQv+yirQ=; b=mZZLYTVummofOSTYJIuu5kutlkCJ4czjNRBPfA8Xq2fs07FbacZwdsElRVk2Tk6DlD067+ rsW4mmpDaNFOd1uWGUYc81ys5JGzqJgRSq3C/Mo/V+3AXxMU6NLLzlENGtywc+rM8YOvr1 w1mDB3wU0xzoPzGCddcsFslCaWHo6yJBk96pyN7F3Z2bTlSG5VO2FftuJZIW5KbLYClqWp TIVDZHfh5B4lNUnUrkFqhkzHDtYV3l6kyfwXyoW3Zb2IA9VL8pdHzthGOms1cCtS62Is9s Y20KiG/NjQd/thLqV5Bspis5nwjTypkeYdjkICiBoeptZIIoGaZCclyrCxZN3Q== 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 4Lvc240XG3zm1Y; Fri, 29 Jul 2022 18:47:08 +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 26TIl7Bc023685; Fri, 29 Jul 2022 18:47:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TIl7Dm023684; Fri, 29 Jul 2022 18:47:07 GMT (envelope-from git) Date: Fri, 29 Jul 2022 18:47:07 GMT Message-Id: <202207291847.26TIl7Dm023684@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: f433ed9c5594 - stable/13 - Fix unused variable warning in sctp_timer.c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: f433ed9c5594e3e349268c741994b72481db1856 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120428; 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=h/qSRWjwJeGI2Y2lRxE3gdTfXTfvA5TRNs5QQv+yirQ=; b=UtDhoKMXpaGcy9RqcHiAcyer/Sc09rknXkKsO+DK/JuoRmpepokHk46Y/O58yx5BKEztZu ealIXlStyoQdTcIHXz3FYyDjJLkqqr/B52lFAyLTaWDKLT0gxw/96IFJJeylb87lU1ypEn aeRZ8yCEUQrH6jqkAdkrbBAaKKsGisAnFyJ1APPKOhCoMt2CUdNn6OqVV2wHBzqHUc3LLP gCJVEuV+zu7bb7nEoY/kErrV6uUm669yCzUQsSWzeZfkCJijbseFV380925McZiA1PyDjl uUMD7I+xpBGIfgl80xT0uB8d37DbPPte4KgTGzAfY0KFH54YD0cv/jyYd/iBmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659120428; a=rsa-sha256; cv=none; b=eFyrmPCrWCskylm+uXFK+XW+cScREVEUYstQmPs6uu411X0G6vHNk9B8id5RFO95hPwE3e FKkTmiEhO8vWYMThfcuEX9PZORQgfyMRWrJKPWxmTJR1UkEf9FflfYkYg437+XVB7Sixri 5ZgDsHCbIYw1NccCzIHArAUDRMVdSnxK7qjZ0O1tic5QLe1rNSrtymxPZFhgrtp6cNXY8i LxqDa3/nJqIX/ofkwknyuzASH0o76dgj50bcYt4sWNbr4SDnKDrI9aLaA4qyKWK+XPnG3Z nwi+KTHCdz0Sby1bem4Ll5EUDIPmYd90wgb6g1WtbbkiioTsiqKhr3ql6arhKQ== 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=f433ed9c5594e3e349268c741994b72481db1856 commit f433ed9c5594e3e349268c741994b72481db1856 Author: Dimitry Andric AuthorDate: 2022-07-25 20:06:28 +0000 Commit: Dimitry Andric CommitDate: 2022-07-29 18:28:06 +0000 Fix unused variable warning in sctp_timer.c With clang 15, the following -Werror warning is produced: sys/netinet/sctp_timer.c:510:6: error: variable 'recovery_cnt' set but not used [-Werror,-Wunused-but-set-variable] int recovery_cnt = 0; ^ The 'recovery_cnt' variable is only used when INVARIANTS is undefined. Ensure it is only declared and set in that case. MFC after: 3 days (cherry picked from commit 5bfd8cf3691381c19296d76d7944d6c1df5f4a75) --- sys/netinet/sctp_timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index 17d834cd2734..8481c76f99ca 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -507,7 +507,9 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, unsigned int cnt_mk; uint32_t orig_flight, orig_tf; uint32_t tsnlast, tsnfirst; +#ifndef INVARIANTS int recovery_cnt = 0; +#endif /* none in flight now */ audit_tf = 0; @@ -565,10 +567,10 @@ start_again: /* Strange case our list got out of order? */ SCTP_PRINTF("Our list is out of order? last_acked:%x chk:%x\n", (unsigned int)stcb->asoc.last_acked_seq, (unsigned int)chk->rec.data.tsn); - recovery_cnt++; #ifdef INVARIANTS panic("last acked >= chk on sent-Q"); #else + recovery_cnt++; SCTP_PRINTF("Recover attempts a restart cnt:%d\n", recovery_cnt); sctp_recover_sent_list(stcb); if (recovery_cnt < 10) {