Re: [PATCH] Initialise hash variable to prevent compiler warnings

2014-10-14 Thread Junio C Hamano
On Tue, Oct 14, 2014 at 4:44 AM, Felipe Franciosi wrote: > On Tue, Oct 14, 2014 at 2:13 AM, Junio C Hamano wrote: >> >> If I really had to choose between the two, adding a useless initialization >> would be the less harmful choice. Adding a meaningless "default:" robs >> ... > Being a bit defensi

Re: [PATCH] Initialise hash variable to prevent compiler warnings

2014-10-14 Thread Felipe Franciosi
On Tue, Oct 14, 2014 at 2:13 AM, Junio C Hamano wrote: > On Mon, Oct 13, 2014 at 2:53 PM, Felipe Franciosi wrote: >> >> On Mon, Oct 13, 2014 at 9:12 PM, Junio C Hamano wrote: >>> >>> FNV/I/IDIV10/0 covers all the possibilities of (method & 3), I would >>> have to say that the compiler needs to b

Re: [PATCH] Initialise hash variable to prevent compiler warnings

2014-10-13 Thread Junio C Hamano
On Mon, Oct 13, 2014 at 2:53 PM, Felipe Franciosi wrote: > > On Mon, Oct 13, 2014 at 9:12 PM, Junio C Hamano wrote: >> >> FNV/I/IDIV10/0 covers all the possibilities of (method & 3), I would >> have to say that the compiler needs to be fixed. >> >> Or insert "default:" just before "case HASH_METH

Re: [PATCH] Initialise hash variable to prevent compiler warnings

2014-10-13 Thread Felipe Franciosi
On Mon, Oct 13, 2014 at 10:53 PM, Felipe Franciosi wrote: > > On Mon, Oct 13, 2014 at 9:12 PM, Junio C Hamano wrote: >> >> Felipe Franciosi writes: >> >> > The 'hash' variable in test-hashmap.c is not initialised properly >> > which causes some 'gcc' versions to complain during compilation. >> >

Re: [PATCH] Initialise hash variable to prevent compiler warnings

2014-10-13 Thread Junio C Hamano
Felipe Franciosi writes: > The 'hash' variable in test-hashmap.c is not initialised properly > which causes some 'gcc' versions to complain during compilation. FNV/I/IDIV10/0 covers all the possibilities of (method & 3), I would have to say that the compiler needs to be fixed. Or insert "defaul

[PATCH] Initialise hash variable to prevent compiler warnings

2014-10-13 Thread Felipe Franciosi
The 'hash' variable in test-hashmap.c is not initialised properly which causes some 'gcc' versions to complain during compilation. Signed-off-by: Felipe Franciosi --- test-hashmap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-hashmap.c b/test-hashmap.c index 07aa7