From 80e3658647561c4a8587978747752f6f63a96717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Thu, 29 Aug 2019 21:13:16 +0200 Subject: help: make help_unknown_ref() NORETURN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Announce that calling help_unknown_ref() exits the program. Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano diff --git a/help.c b/help.c index a9e451f..5231c91 100644 --- a/help.c +++ b/help.c @@ -774,7 +774,8 @@ static struct string_list guess_refs(const char *ref) return similar_refs; } -void help_unknown_ref(const char *ref, const char *cmd, const char *error) +NORETURN void help_unknown_ref(const char *ref, const char *cmd, + const char *error) { int i; struct string_list suggested_refs = guess_refs(ref); diff --git a/help.h b/help.h index b8780fb..7a455be 100644 --- a/help.h +++ b/help.h @@ -43,7 +43,7 @@ void list_commands(unsigned int colopts, struct cmdnames *main_cmds, struct cmdn * call this to die(), when it is suspected that the user mistyped a * ref to the command, to give suggested "correct" refs. */ -void help_unknown_ref(const char *ref, const char *cmd, const char *error); +NORETURN void help_unknown_ref(const char *ref, const char *cmd, const char *error); static inline void list_config_item(struct string_list *list, const char *prefix, -- cgit v0.10.2-6-g49f6