From: Junio C Hamano Date: Sun, 03 May 2026 19:19:47 GMT Subject: Re: [PATCH v3 5/5] format-rev: introduce builtin for on-demand pretty formatting Message-ID: In-Reply-To: builtin/name-rev.c:883:8: error: variable 'commit' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 883 | if (peeled && peeled->type == OBJ_COMMIT) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ builtin/name-rev.c:885:9: note: uninitialized use occurs here 885 | if (!commit) { | ^~~~~~ builtin/name-rev.c:883:4: note: remove the 'if' if its condition is always true 883 | if (peeled && peeled->type == OBJ_COMMIT) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 884 | commit = (struct commit *)peeled; builtin/name-rev.c:883:8: error: variable 'commit' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] 883 | if (peeled && peeled->type == OBJ_COMMIT) | ^~~~~~ builtin/name-rev.c:885:9: note: uninitialized use occurs here 885 | if (!commit) { | ^~~~~~ builtin/name-rev.c:883:8: note: remove the '&&' if its condition is always true 883 | if (peeled && peeled->type == OBJ_COMMIT) | ^~~~~~~~~ builtin/name-rev.c:867:25: note: initialize the variable 'commit' to silence this warning 867 | struct commit *commit; | ^ | = NULL 2 errors generated.