[master] 821a1c27f Mark functions that won't return as such

Federico G. Schwindt fgsch at lodoss.net
Thu Jan 9 22:48:08 UTC 2020


commit 821a1c27ff18381c680e86d9e213bb8f541df5fa
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Thu Jan 9 14:19:07 2020 +0000

    Mark functions that won't return as such

diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index 6d42895f2..7a124249e 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -154,7 +154,7 @@ cli_sock(const char *T_arg, const char *S_arg)
 	return (sock);
 }
 
-static void
+static void v_noreturn_
 do_args(int sock, int argc, char * const *argv)
 {
 	int i;
@@ -267,7 +267,7 @@ pass_answer(int fd)
  * No arguments given, simply pass bytes on stdin/stdout and CLI socket
  * Send a "banner" to varnish, to provoke a welcome message.
  */
-static void
+static void v_noreturn_
 interactive(int sock)
 {
 	struct pollfd fds[2];
@@ -334,7 +334,7 @@ interactive(int sock)
 /*
  * No arguments given, simply pass bytes on stdin/stdout and CLI socket
  */
-static void
+static void v_noreturn_
 pass(int sock)
 {
 	struct pollfd fds[2];
diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 02ae0df84..7ba3a0f52 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -243,7 +243,7 @@ child_malloc_fail(void *p, const char *s)
  * signal handler for child process
  */
 
-static void v_matchproto_()
+static void v_noreturn_ v_matchproto_()
 child_signal_handler(int s, siginfo_t *si, void *c)
 {
 	char buf[1024];
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 5f29632e3..021335979 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -841,7 +841,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
 
 /*--------------------------------------------------------------------*/
 
-static void v_matchproto_(cli_func_t)
+static void v_noreturn_ v_matchproto_(cli_func_t)
 ccf_panic(struct cli *cli, const char * const *av, void *priv)
 {
 
diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index 04a27af95..afeb29de4 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -99,7 +99,7 @@ static struct cli_proto cli_proto[] = {
 
 /*--------------------------------------------------------------------*/
 
-static void v_matchproto_(cli_func_t)
+static void v_noreturn_ v_matchproto_(cli_func_t)
 mcf_panic(struct cli *cli, const char * const *av, void *priv)
 {
 
diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c
index a8997b32e..86d9a354d 100644
--- a/bin/varnishd/mgt/mgt_vcc.c
+++ b/bin/varnishd/mgt/mgt_vcc.c
@@ -84,7 +84,7 @@ mgt_DumpBuiltin(void)
  * Invoke system VCC compiler in a sub-process
  */
 
-static void v_matchproto_(vsub_func_f)
+static void v_noreturn_ v_matchproto_(vsub_func_f)
 run_vcc(void *priv)
 {
 	struct vsb *sb = NULL;
@@ -176,7 +176,7 @@ run_cc(void *priv)
  * Attempt to open compiled VCL in a sub-process
  */
 
-static void v_matchproto_(vsub_func_f)
+static void v_noreturn_ v_matchproto_(vsub_func_f)
 run_dlopen(void *priv)
 {
 	struct vcc_priv *vp;
diff --git a/bin/varnishd/storage/mgt_stevedore.c b/bin/varnishd/storage/mgt_stevedore.c
index c204a3e53..7e16dbc8a 100644
--- a/bin/varnishd/storage/mgt_stevedore.c
+++ b/bin/varnishd/storage/mgt_stevedore.c
@@ -119,7 +119,7 @@ static struct cli_proto cli_stv[] = {
  */
 
 #ifdef WITH_PERSISTENT_STORAGE
-static void v_matchproto_(storage_init_f)
+static void v_noreturn_ v_matchproto_(storage_init_f)
 smp_fake_init(struct stevedore *parent, int ac, char * const *av)
 {
 
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index a080de934..46335e6e2 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -170,7 +170,7 @@ parse_D_opt(char *arg)
  * Print usage
  */
 
-static void
+static void v_noreturn_
 usage(void)
 {
 	fprintf(stderr, "usage: %s [options] file ...\n", argv0);
diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c
index e52c40d5a..783ee4fc4 100644
--- a/lib/libvmod_vtc/vmod_vtc.c
+++ b/lib/libvmod_vtc/vmod_vtc.c
@@ -98,7 +98,7 @@ vmod_no_ip(VRT_CTX)
 
 /*--------------------------------------------------------------------*/
 
-VCL_VOID v_matchproto_(td_vtc_panic)
+VCL_VOID  v_matchproto_(td_vtc_panic) v_noreturn_
 vmod_panic(VRT_CTX, VCL_STRANDS str)
 {
 	const char *b;


More information about the varnish-commit mailing list