[master] 1cee4d37b varnishtest: Address flexelint's tunnel complaints

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri May 28 13:24:06 UTC 2021


commit 1cee4d37bd68fbf47c4db595e5c4bdf10f602f0a
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Fri May 28 15:22:54 2021 +0200

    varnishtest: Address flexelint's tunnel complaints

diff --git a/bin/varnishtest/vtc.h b/bin/varnishtest/vtc.h
index d2b449359..5380f74cd 100644
--- a/bin/varnishtest/vtc.h
+++ b/bin/varnishtest/vtc.h
@@ -148,8 +148,6 @@ void start_h2(struct http *hp);
 void stop_h2(struct http *hp);
 void b64_settings(const struct http *hp, const char *s);
 
-cmd_f cmd_tunnel;
-
 /* vtc_gzip.c */
 void vtc_gzip(struct http *, const char *, char **, long *);
 void vtc_gunzip(struct http *, char *, long *);
diff --git a/bin/varnishtest/vtc_tunnel.c b/bin/varnishtest/vtc_tunnel.c
index 7f1812973..7c579cf27 100644
--- a/bin/varnishtest/vtc_tunnel.c
+++ b/bin/varnishtest/vtc_tunnel.c
@@ -290,7 +290,7 @@ cmd_tunnel_resume(CMD_ARGS)
 	AZ(pthread_mutex_unlock(&t->mtx));
 }
 
-const struct cmds tunnel_cmds[] = {
+static const struct cmds tunnel_cmds[] = {
 #define CMD_TUNNEL(n) { #n, cmd_tunnel_##n },
 	CMD_TUNNEL(pause)
 	CMD_TUNNEL(send)
@@ -305,7 +305,7 @@ const struct cmds tunnel_cmds[] = {
  */
 
 static void
-tunnel_read(struct tunnel *t, struct vtclog *vl, struct pollfd *pfd,
+tunnel_read(struct tunnel *t, struct vtclog *vl, const struct pollfd *pfd,
     struct tunnel_lane *lane)
 {
 	size_t len;


More information about the varnish-commit mailing list