Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-23 Thread Ramsay Jones
On 23/05/17 04:32, Junio C Hamano wrote: > Interesting. One thing that I found somewhat suboptimal is that we > do not get signalled by non-zero exit. Warnings don't lead to non-zero exit, but similarly to -Werror, you can provide a -Wsparse-error to turn warnings into errors: $ make

Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-22 Thread Junio C Hamano
Ramsay Jones writes: > Having said that, I rarely run sparse over just one file (except > when fixing a sparse error/warning). On each branch (master->next->pu) > I do > > $ make sparse >sp-out 2>&1 # nsp-out on 'next', psp-out on 'pu' > > ... so that I can diff

Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-22 Thread Ramsay Jones
On 22/05/17 03:46, Junio C Hamano wrote: > Hmph. I do not know what went wrong. The one I had in /usr/bin > that came from the distro was too old that it didn't give any useful > result and failed, and that was why I got v0.5.0-207-g14964df > installed in ~/gitstuff/bin/ which is early on my

Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-22 Thread Jeff King
On Sun, May 21, 2017 at 11:25:39PM +0100, Ramsay Jones wrote: > Commit d8193743e0 ("usage.c: add BUG() function", 12-05-2017) added the > BUG() functions and macros as a replacement for calls to die("BUG: .."). > The use of NORETURN on the declarations (in git-compat-util.h) and the > lack of

Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-21 Thread Junio C Hamano
Junio C Hamano writes: > Ramsay Jones writes: > >> So, I don't know. Wait let me try your specific version: >> >> $ ~/sparse/sparse --version >> v0.5.0-207-g14964df >> $ ~/sparse/sparse usage.c >> usage.c:220:6: error: symbol 'BUG_fl' redeclared

Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-21 Thread Junio C Hamano
Ramsay Jones writes: > So, I don't know. Wait let me try your specific version: > > $ ~/sparse/sparse --version > v0.5.0-207-g14964df > $ ~/sparse/sparse usage.c > usage.c:220:6: error: symbol 'BUG_fl' redeclared with different type > (originally declared at

Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-21 Thread Ramsay Jones
On 22/05/17 02:43, Junio C Hamano wrote: > Ramsay Jones writes: > >> Commit d8193743e0 ("usage.c: add BUG() function", 12-05-2017) added the >> BUG() functions and macros as a replacement for calls to die("BUG: .."). >> The use of NORETURN on the declarations (in

Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-21 Thread Junio C Hamano
Ramsay Jones writes: > Commit d8193743e0 ("usage.c: add BUG() function", 12-05-2017) added the > BUG() functions and macros as a replacement for calls to die("BUG: .."). > The use of NORETURN on the declarations (in git-compat-util.h) and the > lack of NORETURN on

[PATCH] usage: add NORETURN to BUG() function definitions

2017-05-21 Thread Ramsay Jones
Commit d8193743e0 ("usage.c: add BUG() function", 12-05-2017) added the BUG() functions and macros as a replacement for calls to die("BUG: .."). The use of NORETURN on the declarations (in git-compat-util.h) and the lack of NORETURN on the function definitions, however, leads sparse to complain