Skip to content

Commit 06bdc23

Browse files
peffgitster
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 7bbc4e8 commit 06bdc23

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
@@ -552,6 +552,7 @@ int git_parse_ulong(const char *value, unsigned long *ret)
552552
return 1;
553553
}
554554

555+
NORETURN
555556
static void die_bad_number(const char *name, const char *value)
556557
{
557558
const char *reason = errno == ERANGE ?

0 commit comments

Comments
 (0)