diff mbox series

[01/13] push: do not pretend to return `int` from `die_push_simple()`

Message ID 4d0b38125a13d85963be5e524becf48271893e2b.1569486607.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series ci: include a Visual Studio build & test in our Azure Pipeline | expand

Commit Message

Jean-Noël Avila via GitGitGadget Sept. 26, 2019, 8:30 a.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

This function is marked as `NORETURN`, and it indeed does not want to
return anything. So let's not declare it with the return type `int`.
This fixes the following warning when building with MSVC:

	C4646: function declared with 'noreturn' has non-void return type

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
 builtin/push.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/builtin/push.c b/builtin/push.c
index 021dd3b1e4..d216270d5f 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -143,8 +143,8 @@  static int push_url_of_remote(struct remote *remote, const char ***url_p)
 	return remote->url_nr;
-static NORETURN int die_push_simple(struct branch *branch,
-				    struct remote *remote)
+static NORETURN void die_push_simple(struct branch *branch,
+				     struct remote *remote)
 	 * There's no point in using shorten_unambiguous_ref here,