Browse Source

config.c: mark die_bad_number as NORETURN

This can help avoid -Wuninitialized false positives in
git_config_int and git_config_ulong, as the compiler now
knows that we do not return "ret" if we hit the error
codepath.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Jeff King 11 years ago committed by Junio C Hamano
parent
commit
06bdc23b7e
  1. 1
      config.c

1
config.c

@ -552,6 +552,7 @@ int git_parse_ulong(const char *value, unsigned long *ret) @@ -552,6 +552,7 @@ int git_parse_ulong(const char *value, unsigned long *ret)
return 1;
}

NORETURN
static void die_bad_number(const char *name, const char *value)
{
const char *reason = errno == ERANGE ?

Loading…
Cancel
Save