RE: /* compiler workaround */ - what was the issue?

2016-05-09 Thread Randall S. Becker
On May 9, 2016 3:40 PM Philip Oakley wrote: > From: "Stefan Beller" > > On Fri, May 6, 2016 at 12:57 PM, Junio C Hamano > wrote: > >> Marc Branchaud writes: > >> > >>> On 2016-05-06 02:54 PM, Junio C Hamano wrote: > > I

Re: /* compiler workaround */ - what was the issue?

2016-05-09 Thread Philip Oakley
From: "Stefan Beller" On Fri, May 6, 2016 at 12:57 PM, Junio C Hamano wrote: Marc Branchaud writes: On 2016-05-06 02:54 PM, Junio C Hamano wrote: I wonder if can we come up with a short and sweet notation to remind futhre

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Ramsay Jones
On 06/05/16 21:21, Ramsay Jones wrote: > On 06/05/16 19:54, Junio C Hamano wrote: >> Ramsay Jones writes: >> [snip] > I still can't get gcc to complain, e.g. (on top of above): > > $ git diff > diff --git a/builtin/rev-list.c b/builtin/rev-list.c > index

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Marc Branchaud
On 2016-05-06 03:57 PM, Junio C Hamano wrote: Marc Branchaud writes: On 2016-05-06 02:54 PM, Junio C Hamano wrote: I wonder if can we come up with a short and sweet notation to remind futhre readers that this "initialization" is not initializing but merely squelching

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Ramsay Jones
On 06/05/16 19:54, Junio C Hamano wrote: > Ramsay Jones writes: > >> The patch below applies to master (I haven't checked for any more >> additions). >> >> if (bisect_list) { >> -int reaches = reaches, all = all; >> +int reaches = 0,

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Stefan Beller
On Fri, May 6, 2016 at 12:57 PM, Junio C Hamano wrote: > Marc Branchaud writes: > >> On 2016-05-06 02:54 PM, Junio C Hamano wrote: >>> >>> I wonder if can we come up with a short and sweet notation to remind >>> futhre readers that this "initialization"

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Junio C Hamano
Marc Branchaud writes: > On 2016-05-06 02:54 PM, Junio C Hamano wrote: >> >> I wonder if can we come up with a short and sweet notation to remind >> futhre readers that this "initialization" is not initializing but >> merely squelching warnings from stupid compilers, and

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Marc Branchaud
On 2016-05-06 02:54 PM, Junio C Hamano wrote: I wonder if can we come up with a short and sweet notation to remind futhre readers that this "initialization" is not initializing but merely squelching warnings from stupid compilers, and agree to use it consistently? Perhaps #define

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Junio C Hamano
Ramsay Jones writes: > The patch below applies to master (I haven't checked for any more > additions). > > if (bisect_list) { > - int reaches = reaches, all = all; > + int reaches = 0, all = 0; One thing that is somewhat sad is that

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Philip Oakley
From: "Ramsay Jones" On 06/05/16 14:15, Philip Oakley wrote: From: "Duy Nguyen" On Fri, May 6, 2016 at 4:41 AM, Junio C Hamano wrote: "Philip Oakley" writes: int saved_namelen = saved_namelen;

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Ramsay Jones
On 06/05/16 14:15, Philip Oakley wrote: > From: "Duy Nguyen" >> On Fri, May 6, 2016 at 4:41 AM, Junio C Hamano wrote: >>> "Philip Oakley" writes: >>> int saved_namelen = saved_namelen; /* compiler workaround */

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Philip Oakley
From: "Duy Nguyen" On Fri, May 6, 2016 at 4:41 AM, Junio C Hamano wrote: "Philip Oakley" writes: int saved_namelen = saved_namelen; /* compiler workaround */ Which then becomes an MSVC compile warning C4700: uninitialized

Re: /* compiler workaround */ - what was the issue?

2016-05-06 Thread Duy Nguyen
On Fri, May 6, 2016 at 4:41 AM, Junio C Hamano wrote: > "Philip Oakley" writes: > >> int saved_namelen = saved_namelen; /* compiler workaround */ >> >> Which then becomes an MSVC compile warning C4700: uninitialized local >> variable. >> >> I'm

Re: /* compiler workaround */ - what was the issue?

2016-05-05 Thread Junio C Hamano
"Philip Oakley" writes: > int saved_namelen = saved_namelen; /* compiler workaround */ > > Which then becomes an MSVC compile warning C4700: uninitialized local > variable. > > I'm wondering what was the compiler workaround being referred to? i.e. why > does it need

/* compiler workaround */ - what was the issue?

2016-05-05 Thread Philip Oakley
Duy, In https://github.com/git-for-windows/git/commit/b3c96fb158f05152336f167076f5d81d23c3a5e5 (split-index: strip pathname of on-disk replaced entries, 13 Jun 2014) Nguyễn Thái Ngọc Duy you have read-cache.c#L1790 (in that commit, now ~L1873) int saved_namelen =