Flexelinting

After #3515 merge

I do not understand
     Warning 552: Symbol 'vpi_wrk_len' (line 50, file cache/cache_vpi.c) not accessed

It is used for array sizing, so I have silenced the warning.
parent 4f285262
......@@ -43,7 +43,6 @@
#include "cache_varnishd.h"
#include "cache_transport.h"
#include "vcc_interface.h"
#include "cache_filter.h"
#include "common/heritage.h"
......
......@@ -282,7 +282,7 @@ vcl_find(const char *name)
static void
vcl_panic_conf(struct vsb *vsb, const struct VCL_conf *conf)
{
int i;
unsigned u;
const struct vpi_ii *ii;
if (PAN_dump_struct(vsb, conf, VCL_CONF_MAGIC, "conf"))
......@@ -290,8 +290,8 @@ vcl_panic_conf(struct vsb *vsb, const struct VCL_conf *conf)
VSB_printf(vsb, "syntax = \"%u\",\n", conf->syntax);
VSB_cat(vsb, "srcname = {\n");
VSB_indent(vsb, 2);
for (i = 0; i < conf->nsrc; ++i)
VSB_printf(vsb, "[%d] = \"%s\",\n", i, conf->srcname[i]);
for (u = 0; u < conf->nsrc; ++u)
VSB_printf(vsb, "[%u] = \"%s\",\n", u, conf->srcname[u]);
VSB_indent(vsb, -2);
VSB_cat(vsb, "},\n");
VSB_cat(vsb, "instances = {\n");
......@@ -947,6 +947,7 @@ vcl_cli_show(struct cli *cli, const char * const *av, void *priv)
struct vcl *vcl;
int verbose = 0;
int i = 2;
unsigned u;
ASSERT_CLI();
ASSERT_VCL_ACTIVE();
......@@ -984,11 +985,11 @@ vcl_cli_show(struct cli *cli, const char * const *av, void *priv)
}
CHECK_OBJ_NOTNULL(vcl->conf, VCL_CONF_MAGIC);
if (verbose) {
for (i = 0; i < vcl->conf->nsrc; i++)
VCLI_Out(cli, "// VCL.SHOW %d %zd %s\n%s\n",
i, strlen(vcl->conf->srcbody[i]),
vcl->conf->srcname[i],
vcl->conf->srcbody[i]);
for (u = 0; u < vcl->conf->nsrc; u++)
VCLI_Out(cli, "// VCL.SHOW %u %zd %s\n%s\n",
u, strlen(vcl->conf->srcbody[u]),
vcl->conf->srcname[u],
vcl->conf->srcbody[u]);
} else {
VCLI_Out(cli, "%s", vcl->conf->srcbody[0]);
}
......
......@@ -124,7 +124,8 @@ vpi_ref_panic(struct vsb *vsb, unsigned n, const struct vcl *vcl)
if (src != NULL) {
w = strlen(src);
if (ref->offset >= w)
assert(w > 0);
if (ref->offset >= (unsigned)w)
src = NULL;
}
if (src != NULL) {
......
......@@ -164,6 +164,9 @@
-e441 // for clause irregularity: loop variable '___' not found in 2nd for expression
// cache_vpi.c
-esym(552, vpi_wrk_len)
// from libvarnish
--emacro((835),VBH_NOIDX)
--emacro((835),O_CLOEXEC)
......
......@@ -689,7 +689,7 @@ struct VCL_conf {
unsigned nref;
const struct vpi_ref *ref;
int nsrc;
unsigned nsrc;
unsigned nsub;
const char **srcname;
const char **srcbody;
......
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