Commit 931ef7d8 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Emit __match_proto__() for compiled functions

parent 7d90d625
......@@ -609,6 +609,8 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp)
/* Macro for accessing directors */
Fh(tl, 0, "#define VGCDIR(n) VCL_conf.director[VGC_backend_##n]\n");
Fh(tl, 0, "#define __match_proto__(xxx) /*lint -e{818} */\n");
/* Register and lex the main source */
VTAILQ_INSERT_TAIL(&tl->sources, sp, list);
sp->idx = tl->nsources++;
......@@ -669,7 +671,7 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp)
/* Emit method functions */
for (i = 0; i < VCL_MET_MAX; i++) {
Fc(tl, 1, "\nstatic int\n");
Fc(tl, 1, "\nstatic int __match_proto__(vcl_func_f)\n");
Fc(tl, 1, "VGC_function_%s(struct sess *sp, struct req *req)\n",
method_tab[i].name);
AZ(VSB_finish(tl->fm[i]));
......
......@@ -227,7 +227,7 @@ vcc_Function(struct vcc *tl)
Fh(tl, 0, "static int VGC_function_%.*s "
"(struct sess *, struct req *);\n",
PF(tl->t));
Fc(tl, 1, "\nstatic int\n");
Fc(tl, 1, "\nstatic int __match_proto__(vcl_func_t)\n");
Fc(tl, 1, "VGC_function_%.*s"
"(struct sess *sp, struct req *req)\n",
PF(tl->t));
......
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