git: f006552b18e0 - stable/14 - libctf: remove unused variable

From: Siva Mahadevan <siva_at_FreeBSD.org>
Date: Mon, 14 Sep 2026 14:47:28 UTC
The branch stable/14 has been updated by siva:

URL: https://cgit.FreeBSD.org/src/commit/?id=f006552b18e0abe50428fa2d88b5d046f8e02bb3

commit f006552b18e0abe50428fa2d88b5d046f8e02bb3
Author:     Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-10 14:40:28 +0000
Commit:     Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-09-14 14:32:23 +0000

    libctf: remove unused variable
    
    This fixes the build with gcc 16 after the changes
    to -Wunused*[0].
    
    [0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused
    
    Reviewed by:    markj
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D59537
    
    (cherry picked from commit 8e75ea59b085fb6dedfe5911481e6673a60b48fe)
---
 cddl/contrib/opensolaris/common/ctf/ctf_hash.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cddl/contrib/opensolaris/common/ctf/ctf_hash.c b/cddl/contrib/opensolaris/common/ctf/ctf_hash.c
index 5a36fbbd88cf..adab84efde76 100644
--- a/cddl/contrib/opensolaris/common/ctf/ctf_hash.c
+++ b/cddl/contrib/opensolaris/common/ctf/ctf_hash.c
@@ -77,9 +77,8 @@ ctf_hash_compute(const char *key, size_t len)
 {
 	ulong_t g, h = 0;
 	const char *p, *q = key + len;
-	size_t n = 0;
 
-	for (p = key; p < q; p++, n++) {
+	for (p = key; p < q; p++) {
 		h = (h << 4) + *p;
 
 		if ((g = (h & 0xf0000000)) != 0) {