Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 12949d0

Browse files
peffdscho
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9860bbb commit 12949d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ int git_parse_ulong(const char *value, unsigned long *ret)
556556
return 1;
557557
}
558558

559+
NORETURN
559560
static void die_bad_number(const char *name, const char *value)
560561
{
561562
const char *reason = errno == ERANGE ?

0 commit comments

Comments
 (0)