summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-27 22:41:28 -0700
committerJunio C Hamano <gitster@pobox.com>2018-03-27 22:41:28 -0700
commit54ecf111efad3e13b65e918952afb3f62a44eed0 (patch)
tree933e4041822fe3d6ec705b80660d0e51cb88d5cb
parent90bbd502d54fe920356fa9278055dc9c9bfe9a56 (diff)
downloadgit-jk/connect-die-initial-contact-never-returns.tar.gz
connect.c: mark die_initial_contact() as NORETURNjk/connect-die-initial-contact-never-returns
This allows us to safely use -Wimplicit-fallthrough where gcc does not realize that die() that is already marked as NORETURN will be called in either side of the if/else in this function.
-rw-r--r--connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index c3a014c5ba..49eca46462 100644
--- a/connect.c
+++ b/connect.c
@@ -46,7 +46,7 @@ int check_ref_type(const struct ref *ref, int flags)
return check_ref(ref->name, flags);
}
-static void die_initial_contact(int unexpected)
+static NORETURN void die_initial_contact(int unexpected)
{
if (unexpected)
die(_("The remote end hung up upon initial contact"));