Commit f830854c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

vcc_err_unref=false should also allow unreferenced subroutines.

Submitted by:	ehocdet

Fixes	#911
parent 1184eddd
varnishtest "vcc_err_unref should also cover subs"
server s1 {
rxreq
expect req.url == "/bar"
txresp -body "foobar"
} -start
varnish v1 -arg "-p vcc_err_unref=false" -vcl+backend {
sub foobar {
set req.http.foobar = "foobar";
}
} -start
client c1 {
txreq -url /bar
rxresp
expect resp.http.content-length == 6
expect resp.bodylen == 6
} -run
......@@ -292,6 +292,10 @@ vcc_checkaction2(struct vcc *tl, const struct symbol *sym)
return;
vsb_printf(tl->sb, "Function unused\n");
vcc_ErrWhere(tl, p->name);
if (!tl->err_unref) {
vsb_printf(tl->sb, "(That was just a warning)\n");
tl->err = 0;
}
}
int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment