Skip to content

Commit 78e7b98

Browse files
jonathantanmygitster
authored andcommitted
fsck: cleanup unused variable
Remove the unused variable "heads" from cmd_fsck(). This variable was made unused in commit c3271a0 ("fsck: do not fallback "git fsck <bogus>" to "git fsck"", 2017-01-17). Signed-off-by: Jonathan Tan <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 092c55d commit 78e7b98

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

builtin/fsck.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ static struct option fsck_opts[] = {
660660

661661
int cmd_fsck(int argc, const char **argv, const char *prefix)
662662
{
663-
int i, heads;
663+
int i;
664664
struct alternate_object_database *alt;
665665

666666
errors_found = 0;
@@ -728,7 +728,6 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
728728
}
729729
}
730730

731-
heads = 0;
732731
for (i = 0; i < argc; i++) {
733732
const char *arg = argv[i];
734733
unsigned char sha1[20];
@@ -746,7 +745,6 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
746745
add_decoration(fsck_walk_options.object_names,
747746
obj, xstrdup(arg));
748747
mark_object_reachable(obj);
749-
heads++;
750748
continue;
751749
}
752750
error("invalid parameter: expected sha1, got '%s'", arg);

0 commit comments

Comments
 (0)