@@ -2320,7 +2320,7 @@ static void file_change_m(const char *p, struct branch *b)
static struct strbuf path = STRBUF_INIT;
struct object_entry *oe;
struct object_id oid;
- uint16_t mode, inline_data = 0;
+ uint16_t mode = mode, inline_data = 0;
p = parse_mode(p, &mode);
if (!p)
@@ -129,7 +129,7 @@ static int stat_parent_pid(pid_t pid, struct strbuf *name, int *statppid)
static void push_ancestry_name(struct strvec *names, pid_t pid)
{
struct strbuf name = STRBUF_INIT;
- int ppid;
+ int ppid = ppid;
if (stat_parent_pid(pid, &name, &ppid) < 0)
goto cleanup;
These "workarounds" are to mark variables that are used after initialized, but some compilers with lower optimization levels cannot see and report "used uninitialized". This set targets "gcc-13 -Os". For the reason why this is a wrong thing to do for longer-term code health, see https://lore.kernel.org/git/xmqqed946auc.fsf@gitster.g/ Signed-off-by: Junio C Hamano <gitster@pobox.com> --- builtin/fast-import.c | 2 +- compat/linux/procinfo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)