From nobody Sun Nov 14 17:16:08 2021 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 DFA6918651F1; Sun, 14 Nov 2021 17:16: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 4Hsf9h61X8z3Q67; Sun, 14 Nov 2021 17:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 AA0701FC7; Sun, 14 Nov 2021 17:16: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 1AEHG8Zj042340; Sun, 14 Nov 2021 17:16:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AEHG8KC042339; Sun, 14 Nov 2021 17:16:08 GMT (envelope-from git) Date: Sun, 14 Nov 2021 17:16:08 GMT Message-Id: <202111141716.1AEHG8KC042339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 5a4e46f6ec47 - main - net: whack "set but not used" warnings in net/if.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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a4e46f6ec470593be5a3d2d41591e714759e1c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5a4e46f6ec470593be5a3d2d41591e714759e1c0 commit 5a4e46f6ec470593be5a3d2d41591e714759e1c0 Author: Mateusz Guzik AuthorDate: 2021-11-14 17:15:08 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-14 17:15:08 +0000 net: whack "set but not used" warnings in net/if.c Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 83a0b07805ee..c7a6706f41df 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -746,7 +746,7 @@ if_free(struct ifnet *ifp) void if_ref(struct ifnet *ifp) { - u_int old; + u_int old __diagused; /* We don't assert the ifnet list lock here, but arguably should. */ old = refcount_acquire(&ifp->if_refcount); @@ -1847,7 +1847,7 @@ fail: void ifa_ref(struct ifaddr *ifa) { - u_int old; + u_int old __diagused; old = refcount_acquire(&ifa->ifa_refcnt); KASSERT(old > 0, ("%s: ifa %p has 0 refs", __func__, ifa));