Re: [PATCH 0/2] fix status_printf_ln calls "zero-length format" warnings

2014-03-11 Thread Junio C Hamano
Jeff King writes: > Most of us who compile with -Wall decided a while ago to use > -Wno-format-zero-length, because it really is a silly complaint (it > assumes there are no side effects of the function besides printing the > format string, which is obviously not true in this case). > > It would

Re: [PATCH 0/2] fix status_printf_ln calls "zero-length format" warnings

2014-03-10 Thread Jeff King
On Mon, Mar 10, 2014 at 08:27:25PM +0100, Benoit Pierre wrote: > Those happens with "gcc -Wformat-zero-length". Since passing NULL does not > generate a warning (as __attribute__((printf())) does not imply nonull), > modify > status_printf/status_printf_ln to allow a NULL format and update calls

[PATCH 0/2] fix status_printf_ln calls "zero-length format" warnings

2014-03-10 Thread Benoit Pierre
Those happens with "gcc -Wformat-zero-length". Since passing NULL does not generate a warning (as __attribute__((printf())) does not imply nonull), modify status_printf/status_printf_ln to allow a NULL format and update calls with an empty string. Benoit Pierre (2): status: allow NULL fmt for st