From nobody Wed Apr 06 23:46:07 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 EAAB91A832BE; Wed, 6 Apr 2022 23:46: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 4KYh3g5Tgsz4QsN; Wed, 6 Apr 2022 23:46:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288768; 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=kvM8j2chII/toNCLU2nnnASS/sX02AsBGZ5fHSzPsUM=; b=uA/pxiMOnSYqFBkYqZgV6TgQLE9Ak+3B2DMwzKSCA7Y+Rp2DbyA6jt6vN2mo77H5LML8Im csPXSDY7c7bfIZMFRtlLTturAtOzYVaEMwLlquBOOO2CcS1wbypZ+LoyVJly7QUzHozPc9 GXQ4+Pf210oUYktM1hixnLNaqsVysCHALOU4LheDskyDf6VvgIrh/Ev8XV4GPE4y3roTp6 zP9iXpkhwYox1CVa70Blx66k5S8FbwBDojiTQVgNuoe5/bAZoPQ0r017N7zBIPFazjUtv6 S6/03m3VdImvFLmgnsWp5PSUKsLcrvZ87JrZoUqkVxZjqsRwCquu3INoVfKgFw== 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 86955245E5; Wed, 6 Apr 2022 23:46:07 +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 236Nk7lj008817; Wed, 6 Apr 2022 23:46:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236Nk74e008816; Wed, 6 Apr 2022 23:46:07 GMT (envelope-from git) Date: Wed, 6 Apr 2022 23:46:07 GMT Message-Id: <202204062346.236Nk74e008816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8b6ccfb6c700 - main - multicast code: Quiet unused warnings for variables used for KTR traces. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b6ccfb6c7006fb7ab5f1e6b00b67675f8ce147e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288768; 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=kvM8j2chII/toNCLU2nnnASS/sX02AsBGZ5fHSzPsUM=; b=KlB84rjdLr+0e5+ih4O9ioBjbZkt7g4BFG/3hb20VLjg3Q0KjLbLK9mNTSSQPTOsw3qORY uOsyFm9qzHSeCnA7n6PIrZojO6eAncQKlnbDILV1J4fKITjvCrsK6R44Smtq8NUxc+iqML XsIRtVQHzuaLXcHogrGp5mdzYD8yYuSgeZXnSF9iSuKKvIJGpBYFFXWAqBkpygNgkQXyec 8mixGXQC6zuneaOj1MmM9sEhCjxj1JzO1N0XVK9Bz1QQUYThInCAfLD/zyvOiardq3XVe+ GXFDzuW/BuwU/SOBbGQun99+8+ydxi8HclXCefzxR7TE9VVmWvKT7sK4cR+cgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649288768; a=rsa-sha256; cv=none; b=L2f1vD9L8B8/vSjRu3sXMPU+oAUqq9k8kyxpDKoEoYapdsFleUYog+3ZG/f2M4069s4/Ny l2iqYhTQYoK/aq0U3/f/ygiw7K+ooUMs9hI4PUgP4iUqexMBYCebA0/31AZ0RIRuXPcOCB FujH6ym2QBtR9z9oEMaTS1SQmCcOYU75rvQBvGStNwYGNgzkvzCijc3COoVxpWYj8lH4KG b6itHN0VNs/r5u295GJXXkXcQLtogsatXQzMjqfYpqGDGKYj8ZVjB1PlXKmoHMAyFpg4yn kH3+ffz7H4lbEXTUM/JuzZVwidoTUAr9PGwjpsXPX3VlH8hS5Wa0euG+KemgUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8b6ccfb6c7006fb7ab5f1e6b00b67675f8ce147e commit 8b6ccfb6c7006fb7ab5f1e6b00b67675f8ce147e Author: John Baldwin AuthorDate: 2022-04-06 23:45:28 +0000 Commit: John Baldwin CommitDate: 2022-04-06 23:45:28 +0000 multicast code: Quiet unused warnings for variables used for KTR traces. For nallow and nblock, move the variables under #ifdef KTR. For return values from functions logged in KTR traces, mark the variables as __unused rather than having to #ifdef the assignment of the function return value. --- sys/netinet/igmp.c | 6 ++++++ sys/netinet6/mld6.c | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 58d66ebafe64..61a83356a01c 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -3052,7 +3052,9 @@ igmp_v3_enqueue_filter_change(struct mbufq *mq, struct in_multi *inm) struct mbuf *m, *m0, *md; in_addr_t naddr; int m0srcs, nbytes, npbytes, off, rsrcs, schanged; +#ifdef KTR int nallow, nblock; +#endif uint8_t mode, now, then; rectype_t crt, drt, nrt; @@ -3072,8 +3074,10 @@ igmp_v3_enqueue_filter_change(struct mbufq *mq, struct in_multi *inm) npbytes = 0; /* # of bytes appended this packet */ rsrcs = 0; /* # sources encoded in current record */ schanged = 0; /* # nodes encoded in overall filter change */ +#ifdef KTR nallow = 0; /* # of source entries in ALLOW_NEW */ nblock = 0; /* # of source entries in BLOCK_OLD */ +#endif nims = NULL; /* next tree node pointer */ /* @@ -3197,8 +3201,10 @@ igmp_v3_enqueue_filter_change(struct mbufq *mq, struct in_multi *inm) "%s: m_append() failed", __func__); return (-ENOMEM); } +#ifdef KTR nallow += !!(crt == REC_ALLOW); nblock += !!(crt == REC_BLOCK); +#endif if (++rsrcs == m0srcs) break; } diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index 1f79ef39e40e..15ad5196d205 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -1568,7 +1568,7 @@ mld_v2_process_group_timers(struct in6_multi_head *inmh, * immediate transmission. */ if (query_response_timer_expired) { - int retval; + int retval __unused; retval = mld_v2_enqueue_group_record(qrq, inm, 0, 1, (inm->in6m_state == MLD_SG_QUERY_PENDING_MEMBER), @@ -2702,10 +2702,10 @@ mld_v2_enqueue_filter_change(struct mbufq *mq, struct in6_multi *inm) struct ip6_msource *ims, *nims; struct mbuf *m, *m0, *md; int m0srcs, nbytes, npbytes, off, rsrcs, schanged; - int nallow, nblock; uint8_t mode, now, then; rectype_t crt, drt, nrt; #ifdef KTR + int nallow, nblock; char ip6tbuf[INET6_ADDRSTRLEN]; #endif @@ -2725,8 +2725,10 @@ mld_v2_enqueue_filter_change(struct mbufq *mq, struct in6_multi *inm) nbytes = 0; /* # of bytes appended to group's state-change queue */ rsrcs = 0; /* # sources encoded in current record */ schanged = 0; /* # nodes encoded in overall filter change */ +#ifdef KTR nallow = 0; /* # of source entries in ALLOW_NEW */ nblock = 0; /* # of source entries in BLOCK_OLD */ +#endif nims = NULL; /* next tree node pointer */ /* @@ -2847,8 +2849,10 @@ mld_v2_enqueue_filter_change(struct mbufq *mq, struct in6_multi *inm) "%s: m_append() failed", __func__); return (-ENOMEM); } +#ifdef KTR nallow += !!(crt == REC_ALLOW); nblock += !!(crt == REC_BLOCK); +#endif if (++rsrcs == m0srcs) break; } @@ -3006,7 +3010,7 @@ mld_v2_dispatch_general_query(struct mld_ifsoftc *mli) struct ifmultiaddr *ifma; struct ifnet *ifp; struct in6_multi *inm; - int retval; + int retval __unused; NET_EPOCH_ASSERT(); IN6_MULTI_LIST_LOCK_ASSERT();