summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-04-16 12:51:47 -0400
committerJunio C Hamano <gitster@pobox.com>2014-04-16 10:21:14 -0700
commit06bdc23b7e5b20ab06bf0feb3d463d032978992f (patch)
tree80e533b57e329ac6234d1a14cb9696ce240cb705 /config.c
parent7bbc4e8fdb33e0a8e42e77cc05460d4c4f615f4d (diff)
downloadgit-06bdc23b7e5b20ab06bf0feb3d463d032978992f.tar.gz
config.c: mark die_bad_number as NORETURNjk/config-die-bad-number-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>
Diffstat (limited to 'config.c')
-rw-r--r--config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/config.c b/config.c
index e1d66a145b..67e62ac8e5 100644
--- a/config.c
+++ b/config.c
@@ -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 ?