@@ -200,6 +200,8 @@ static int deflate_to_pack(struct bulk_checkin_state *state,
struct hashfile_checkpoint checkpoint;
struct pack_idx_entry *idx = NULL;
+ checkpoint.offset = 0;
+
seekback = lseek(fd, 0, SEEK_CUR);
if (seekback == (off_t) -1)
return error("cannot find the current offset");
@@ -903,7 +903,8 @@ static int store_object(
struct object_entry *e;
unsigned char hdr[96];
struct object_id oid;
- unsigned long hdrlen, deltalen;
+ unsigned long hdrlen;
+ unsigned long deltalen = 0;
git_hash_ctx c;
git_zstream s;
gcc 9.2.1 with -flto flag suspects some uninitialized variables which become initialized in every code path where they are used. These false positives are "fixed" by this patch in the most naïve way. This allows to compile git with gcc 9, link-time optimization, and using the DEVELOPER=1 switch (which sets -Werror). Signed-off-by: Stephan Beyer <s-beyer@gmx.net> --- bulk-checkin.c | 2 ++ fast-import.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.23.0.43.g31ebfd7ae6.dirty