From nobody Sat Jul 23 08:59:06 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 4LqgGM2x1yz4X7HD; Sat, 23 Jul 2022 08:59:07 +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 4LqgGM0jZnz3hSk; Sat, 23 Jul 2022 08:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658566747; 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=fxxbD00e8MDOZdyppQaIiyYNFTkpDeofxtFDFPTtjNU=; b=B+E7P5k/LG2xIuJqo8Zot6s3e1halKQDpAUYd63pG3GXmMWJJA0r53UWJG46CH9Kft/men EUwyv465QqffJvirgr809jTLJWiexIHJapzAvhU0jjmjvxKOxEuR9v8RT/VuzN/s6Gv1TQ +SkXShKPiNBq7zvAso0DJaxDkWY3RIRHdS7VOUxnlENFTKSt+z4CSsKn0oxKholV9gDvpi hN1YUfqM+r/Rj+8TbKe58F6fiF6ZBVgEKFAJ3YaTlgl1YX6UxJaTB474B1kPTYABbzWA9A jPuTa1HfTWUh+SvS2J4ugyEKU2LERTGO8+Q9DxaTYYrhguKNpRslMlOFglr93w== 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 4LqgGL6wM0zZGG; Sat, 23 Jul 2022 08:59:06 +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 26N8x6Gg013468; Sat, 23 Jul 2022 08:59:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26N8x66s013467; Sat, 23 Jul 2022 08:59:06 GMT (envelope-from git) Date: Sat, 23 Jul 2022 08:59:06 GMT Message-Id: <202207230859.26N8x66s013467@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: ebdbb70a589d - stable/12 - Suppress unused variable warning in ip_dummynet.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/12 X-Git-Reftype: branch X-Git-Commit: ebdbb70a589debb15586d715bf2dd70fb767f884 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658566747; 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=fxxbD00e8MDOZdyppQaIiyYNFTkpDeofxtFDFPTtjNU=; b=k0Hni4drZj0bN0NtDLPXEkRS8C0gmf2XU2gk7e4UcExwpYex+LVbOcyZX7zNu8EG9cElRr TFUdpneViUEkDLqfRRqp5RSNgJ8NuhAnDa3yRtgqG6iPw7tKETaldDlILvofJVN8/3AoPD 6EqDmyLdpFTkwT0BfB3GcqkqNSeG4+tpAQNmoGAGf+XqaIxWRijXJemJqhXoleQil9gCMK 1TRXIZhlUxfRKY//dfReKOq68Tu0bLme0ZdgSFgdBFLXUv86L/b2AdkJDiqPJMy+6gdwkB YLa6v2P+kdkJIRrtUHdAXLp61YTNaGOD4LNrYQfturf0F/TKtsHyeMHLHZNucQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658566747; a=rsa-sha256; cv=none; b=JdnqJWJdFCPKA5H7zAQdCaBOMfcOIJZYeHILwHuonf0XAl1zHqv8cWRtsTn785Sh4DAoMa nVMVED0H1t1g3n9cfd0pPurmpnvA+jJ1OJOn5uC86mJC4kFOb/3twN8sl6zty8EzNq4Qc1 o6kYJh358t4t/cCddrT6f+z7cgpTbrvF4jvWBKYYtQf53TJYYz1VkeKQJganwySXgksCaS H7j3e9YEPzY/fhljZs/TaFFt3lewL19jJtOMN4k1PAav3tGX48l9qDA2i2yWA455jnaSK+ qWgaFC6v4p54GO892cQLbMl6EuVGWYg1gLGR6j/8BfE2QD0nJ9WzB71Pc/mTIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ebdbb70a589debb15586d715bf2dd70fb767f884 commit ebdbb70a589debb15586d715bf2dd70fb767f884 Author: Dimitry Andric AuthorDate: 2022-07-19 19:43:46 +0000 Commit: Dimitry Andric CommitDate: 2022-07-23 08:57:44 +0000 Suppress unused variable warning in ip_dummynet.c With clang 15, the following -Werror warning is produced: sys/netpfil/ipfw/ip_dummynet.c:802:6: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable] int n = 0; /* only for stats */ ^ Here, 'n' is a variable that is only used when debugging. Mark the variable as potentially unused, to suppress the warning. MFC after: 3 days (cherry picked from commit 5c329f0a4d32cec54250ec2d3f61455e85137a6f) --- sys/netpfil/ipfw/ip_dummynet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c index a637d4bbd317..bba731969887 100644 --- a/sys/netpfil/ipfw/ip_dummynet.c +++ b/sys/netpfil/ipfw/ip_dummynet.c @@ -788,7 +788,7 @@ static void fsk_detach_list(struct dn_fsk_head *h, int flags) { struct dn_fsk *fs; - int n = 0; /* only for stats */ + int n __unused = 0; /* only for stats */ ND("head %p flags %x", h, flags); while ((fs = SLIST_FIRST(h))) {