From nobody Sat Aug 19 13:03:38 2023 X-Original-To: dev-commits-src-main@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 4RSf7Z38W6z4qh50; Sat, 19 Aug 2023 13:03:38 +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 4RSf7Z2T16z3cRq; Sat, 19 Aug 2023 13:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692450218; 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=IPQ/7pbh6kzNnUdYKA1mySAoppwSXKwnaNlLN/EtK6o=; b=V081GH+8DKt/iUlpFJ8X8w4deyGLzhyp90+GJ5a+9ETrkWhcxIBPryyot0ZF2aK2Ztncw6 2afufeTY01Xn59zZWJsXnbxzibrpOMUdjzBJvvAR1AC5s23PKX8abi4CrCop0xiNuCGx2b lwkO9kfBA+nCPU5PncirTQsTHTecqFGUqOyW7SApCNO3sgrkeWXk7azbS4zzrbEqCmTZmt U5nqJ9CmK4nh3fkijtw2ISE5r6QRc7++xngCy1IvIVxAWUAtvcDOmbZ58ns8XVXd8rtNt4 d5bPCDJvwu5vWPdIyQcIzpHnaBfNfdVm+OWpMPqOK8RxG1dc6WOwhBl9jGl/AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692450218; 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=IPQ/7pbh6kzNnUdYKA1mySAoppwSXKwnaNlLN/EtK6o=; b=IErCMGo712V1a/CqP9UVOI259j2q7kOdHl65g9cP2v9JzdQgVXv9XRfLX1kzPVP1p6sVuE ldEgoPx38D3bcx73L5KGXdgYjuAodD238KFROGu5FG1zv9oR4yrzisLMXuRJX8oV6UBEvM 0Ry5X8ficHlhPaktEoikx2uV77v/eYjhc9AATAwWeOCGRhy2RnUJ9/a+rU78IEuVzyLT4e ymQ07qyUGDQYhmAoe6h3L4NtDZt3tW4NEUmDTR86gflqYkpMWCDqMBKaDgrlgF7E6Ji+4w rte/aTfwuxeG9j4q8XW8GEKua+/oMgOLKSVFwzA9j8QE4hkBpzPgQ1Ai1AE8YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692450218; a=rsa-sha256; cv=none; b=K8MSAbdBrRMhK8aTOBymZ0Jp634j8WhObDbfF+Mtl8vk4nJD9v6hMLBdnevrksPKY7ymXm RqayHMDtdklMYUcTd8OScnHJ2vG4gwDH1F7WijPopz/ecfjD1sBkDYf5rETp2VoWy1MQw8 ML42gAqbgFycv6juLeQVMtTWcpRbgZ5yerilidXNL6kOBSGzqShxbZDud5BdKFHBcvSb5B vQz0Dd1Ydpf5Cksh0FUB7Rh4xYJeateq3+urbFbkEHnGquEvKquUmhS2fu+dfZHYZgIOjl iCHj1ZVNn13J1BV3gD5L/kO7Yzqd9leuCkgS/f+Kb85av6+xv51oD8WFylIVwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RSf7Z1Czxz101J; Sat, 19 Aug 2023 13:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37JD3cZK002579; Sat, 19 Aug 2023 13:03:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37JD3ceG002576; Sat, 19 Aug 2023 13:03:38 GMT (envelope-from git) Date: Sat, 19 Aug 2023 13:03:38 GMT Message-Id: <202308191303.37JD3ceG002576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 1095da75032b - main - sctp: fix a warning List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1095da75032b439d893c0947eda2f3738ecfe494 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1095da75032b439d893c0947eda2f3738ecfe494 commit 1095da75032b439d893c0947eda2f3738ecfe494 Author: Michael Tuexen AuthorDate: 2023-08-19 11:24:02 +0000 Commit: Michael Tuexen CommitDate: 2023-08-19 11:24:02 +0000 sctp: fix a warning Fix an unused-but-set-variable warning for builds without INVARIANTS. Reported by: O. Hartmann MFC after: 1 week --- sys/netinet/sctp_input.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 059c6ded2e5e..f3227c913e1e 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -833,14 +833,12 @@ static void sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_flag) { - struct sctp_association *asoc; int some_on_streamwheel; int old_state; SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown: handling SHUTDOWN\n"); if (stcb == NULL) return; - asoc = &stcb->asoc; if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { return; @@ -872,7 +870,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, sctp_ulp_notify(SCTP_NOTIFY_PEER_SHUTDOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* reset time */ - (void)SCTP_GETTIME_TIMEVAL(&asoc->time_entered); + (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); } } if (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_SENT) { @@ -886,8 +884,8 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, /* Now is there unsent data on a stream somewhere? */ some_on_streamwheel = sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED); - if (!TAILQ_EMPTY(&asoc->send_queue) || - !TAILQ_EMPTY(&asoc->sent_queue) || + if (!TAILQ_EMPTY(&stcb->asoc.send_queue) || + !TAILQ_EMPTY(&stcb->asoc.sent_queue) || some_on_streamwheel) { /* By returning we will push more data out */ return; @@ -916,15 +914,12 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, struct sctp_tcb *stcb, struct sctp_nets *net) { - struct sctp_association *asoc; - SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_ack: handling SHUTDOWN ACK\n"); if (stcb == NULL) { return; } - asoc = &stcb->asoc; /* process according to association state */ if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { @@ -946,8 +941,8 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, * case. */ #ifdef INVARIANTS - if (!TAILQ_EMPTY(&asoc->send_queue) || - !TAILQ_EMPTY(&asoc->sent_queue) || + if (!TAILQ_EMPTY(&stcb->asoc.send_queue) || + !TAILQ_EMPTY(&stcb->asoc.sent_queue) || sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED)) { panic("Queues are not empty when handling SHUTDOWN-ACK"); }