usage: add NORETURN to BUG() function definitions

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 thus: SP usage.c usage.c:220:6: error: symbol 'BUG_fl' redeclared with different type (originally declared at git-compat-util.h:1074) - different modifiers In order to suppress the sparse error, add the NORETURN to the function definitions. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ramsay Jones committed May 21, 2017 at 23:25 UTC 3d7dd2d3b6ccc8903a37cffe3a2f39cf1be21c86
1 file changed +2 -2
usage.c
+2 -2
@@ -217,7 +217,7 @@ static NORETURN void BUG_vfl(const char *file, int line, const char *fmt, va_lis
217 }
218
219 #ifdef HAVE_VARIADIC_MACROS
220 -void BUG_fl(const char *file, int line, const char *fmt, ...)
220 +NORETURN void BUG_fl(const char *file, int line, const char *fmt, ...)
221 {
222 va_list ap;
223 va_start(ap, fmt);
@@ -225,7 +225,7 @@ void BUG_fl(const char *file, int line, const char *fmt, ...)
225 va_end(ap);
226 }
227 #else
228 -void BUG(const char *fmt, ...)
228 +NORETURN void BUG(const char *fmt, ...)
229 {
230 va_list ap;
231 va_start(ap, fmt);