On 14/11/16 17:01, Jeff King wrote: > On Mon, Nov 14, 2016 at 05:35:56PM +0100, Torsten Bögershausen wrote: > >>> Git 'pu' does not compile on macOS right now: >>> builtin/bisect--helper.c:299:6: error: variable 'good_syn' is used uninitialized >>> whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] > > The next step is to make sure that the topic author is aware (in this > case, one assumes it's pb/bisect). [+cc Pranit] Yep, I had a quick squint, and it looks like the compiler is correct. It should be complaining about the 'bad_syn' variable for exactly the same reason: namely, whenever the if condition is true, the only exit from that block is via 'goto finish' which bypasses the initialisation of 'good_syn' and 'bad_syn'. > Better still is to make a patch that can either be applied on top, or > squashed as appropriate. No patch this time, but it simply requires those variables to be initialised to NULL in their declarations. :-D > I know that Ramsay Jones does this, for > example, with some of his sparse-related checks, and I'm pretty sure > from the turnaround-time that he runs it against "pu". Yep, the idea being to catch these simple problems before the topic reaches 'next'. ATB, Ramsay Jones