]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
generator: fix build warning
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jun 2026 12:50:42 +0000 (14:50 +0200)
committerAndrew Tridgell <andrew@tridgell.net>
Mon, 15 Jun 2026 19:54:17 +0000 (05:54 +1000)
in sum_sizes_sqroot() cnt is assigned a variable but never actually
used, so remove it entirely as it's not needed anymore.

generator.c

index 107c925a35832384eb8086084fb3295be75a1ac3..8642236e7ba310d5cce106b9f2cd8e054c21656f 100644 (file)
@@ -718,8 +718,7 @@ static void sum_sizes_sqroot(struct sum_struct *sum, int64 len)
        else {
                int32 max_blength = protocol_version < 30 ? OLD_MAX_BLOCK_SIZE : MAX_BLOCK_SIZE;
                int32 c;
-               int cnt;
-               for (c = 1, l = len, cnt = 0; l >>= 2; c <<= 1, cnt++) {}
+               for (c = 1, l = len; l >>= 2; c <<= 1) {}
                if (c < 0 || c >= max_blength)
                        blength = max_blength;
                else {