On Tue, Dec 13, 2022 at 10:51:57AM +0900, Junio C Hamano wrote: > Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes: > > > diff --git a/object-file.c b/object-file.c > > index 429e3a746d..e0cef8b906 100644 > > --- a/object-file.c > > +++ b/object-file.c > > @@ -1422,7 +1422,9 @@ static int loose_object_info(struct repository *r, > > struct object_info *oi, int flags) > > { > > int status = 0; > > + int fd; > > unsigned long mapsize; > > + const char *path = NULL; > > It may be OK to leave this uninitialized, as long as the contract of > open_loose_object() is that a successful opening will report the path > to the loose object file that was opened. Because ... Yeah, I'd agree that this initialization can be left off (and that the NULL checks later in the function are not needed). -Peff