git: a1020633443d - stable/15 - fsck_msdosfs: remove unused variable

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

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

commit a1020633443d0f94227477913fb3a940a709f212
Author:     Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-10 14:38:44 +0000
Commit:     Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-09-14 14:02:36 +0000

    fsck_msdosfs: 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:    delphij
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D59543
    
    (cherry picked from commit fead44b3ed61a09c2a0c4f79537462e837067fce)
---
 sbin/fsck_msdosfs/dir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c
index e24824261a9f..2802332d315e 100644
--- a/sbin/fsck_msdosfs/dir.c
+++ b/sbin/fsck_msdosfs/dir.c
@@ -449,10 +449,10 @@ checksize(struct fat_descriptor *fat, u_char *p, struct dosDirEntry *dir)
 		      fullpath(dir));
 		if (ask(1, "Drop superfluous clusters")) {
 			cl_t cl;
-			u_int32_t sz, len;
+			u_int32_t sz;
 
-			for (cl = dir->head, len = sz = 0;
-			    (sz += boot->ClusterSize) < dir->size; len++)
+			for (cl = dir->head, sz = 0;
+			    (sz += boot->ClusterSize) < dir->size;)
 				cl = fat_get_cl_next(fat, cl);
 			clearchain(fat, fat_get_cl_next(fat, cl));
 			ret = fat_set_cl_next(fat, cl, CLUST_EOF);