From: phk Date: Wed, 28 Jan 2009 11:48:07 +0000 (+0000) Subject: More FlexeLint silencing. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11063e7fbb8b7409e5d1db6df5916f0f1a3b05e1;p=varnish More FlexeLint silencing. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3550 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_expire.c b/varnish-cache/bin/varnishd/cache_expire.c index eb81a956..f533505f 100644 --- a/varnish-cache/bin/varnishd/cache_expire.c +++ b/varnish-cache/bin/varnishd/cache_expire.c @@ -184,7 +184,7 @@ EXP_Insert(struct object *o) assert(o->entered != 0 && !isnan(o->entered)); oe->lru_stamp = o->entered; - update_object_when(o); + (void)update_object_when(o); Lck_Lock(&exp_mtx); binheap_insert(exp_heap, oe); assert(oe->timer_idx != BINHEAP_NOIDX); @@ -332,7 +332,7 @@ exp_timer(void *arg) WSL(&ww, SLT_Debug, 0, "Attempt Prefetch %u", o->xid); } - update_object_when(o); + (void)update_object_when(o); Lck_Lock(&exp_mtx); binheap_insert(exp_heap, oe); assert(oe->timer_idx != BINHEAP_NOIDX); diff --git a/varnish-cache/bin/varnishd/cache_fetch.c b/varnish-cache/bin/varnishd/cache_fetch.c index cc7566eb..5cb16f6b 100644 --- a/varnish-cache/bin/varnishd/cache_fetch.c +++ b/varnish-cache/bin/varnishd/cache_fetch.c @@ -351,7 +351,7 @@ Fetch(struct sess *sp) TCP_blocking(vc->fd); /* XXX: we should timeout instead */ WRW_Reserve(w, &vc->fd); - http_Write(w, hp, 0); /* XXX: stats ? */ + (void)http_Write(w, hp, 0); /* XXX: stats ? */ /* Deal with any message-body the request might have */ i = FetchReqBody(sp); diff --git a/varnish-cache/bin/varnishd/cache_hash.c b/varnish-cache/bin/varnishd/cache_hash.c index eb362dfd..aec29423 100644 --- a/varnish-cache/bin/varnishd/cache_hash.c +++ b/varnish-cache/bin/varnishd/cache_hash.c @@ -228,7 +228,6 @@ struct object * HSH_Lookup(struct sess *sp) { struct worker *w; - struct http *h; struct objhead *oh; struct object *o, *busy_o, *grace_o; @@ -237,7 +236,6 @@ HSH_Lookup(struct sess *sp) CHECK_OBJ_NOTNULL(sp->http, HTTP_MAGIC); AN(hash); w = sp->wrk; - h = sp->http; HSH_Prealloc(sp); SHA256_Final(sp->wrk->nobjhead->digest, sp->wrk->sha256ctx); diff --git a/varnish-cache/bin/varnishd/cache_http.c b/varnish-cache/bin/varnishd/cache_http.c index 558daa00..f83da384 100644 --- a/varnish-cache/bin/varnishd/cache_http.c +++ b/varnish-cache/bin/varnishd/cache_http.c @@ -796,8 +796,8 @@ http_Unset(struct http *hp, const char *hdr) if (http_IsHdr(&hp->hd[u], hdr)) continue; if (v != u) { - memcpy(&hp->hd[v], &hp->hd[u], sizeof hp->hd[v]); - memcpy(&hp->hdf[v], &hp->hdf[u], sizeof hp->hdf[v]); + memcpy(&hp->hd[v], &hp->hd[u], sizeof *hp->hd); + memcpy(&hp->hdf[v], &hp->hdf[u], sizeof *hp->hdf); } v++; } diff --git a/varnish-cache/bin/varnishd/flint.lnt b/varnish-cache/bin/varnishd/flint.lnt index 492c71b1..7d3fbdd2 100644 --- a/varnish-cache/bin/varnishd/flint.lnt +++ b/varnish-cache/bin/varnishd/flint.lnt @@ -7,6 +7,7 @@ -e459 // unlocked access from func-ptr -e454 // mutex not released (...ReleaseLocked) -e457 // unprotected access +-e777 // float equality comparison -esym(458, lbv_assert) // unlocked access -esym(458, params) // unlocked access @@ -56,6 +57,8 @@ -emacro(702, WEXITSTATUS) // signed shift right -efunc(525, VCC_Return_Name) // Negative indent + + // -header(../../config.h) // Fix strchr() semtics, it can only return NULL if arg2 != 0 diff --git a/varnish-cache/bin/varnishd/mgt.h b/varnish-cache/bin/varnishd/mgt.h index a64eb26d..cee8dd1b 100644 --- a/varnish-cache/bin/varnishd/mgt.h +++ b/varnish-cache/bin/varnishd/mgt.h @@ -49,7 +49,7 @@ void mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident); int mgt_cli_askchild(unsigned *status, char **resp, const char *fmt, ...); void mgt_cli_start_child(int fdi, int fdo); void mgt_cli_stop_child(void); -int mgt_cli_telnet(int dflag, const char *T_arg); +void mgt_cli_telnet(int dflag, const char *T_arg); /* mgt_param.c */ void MCF_ParamSync(void); diff --git a/varnish-cache/bin/varnishd/mgt_cli.c b/varnish-cache/bin/varnishd/mgt_cli.c index c8c12d21..07b5ce48 100644 --- a/varnish-cache/bin/varnishd/mgt_cli.c +++ b/varnish-cache/bin/varnishd/mgt_cli.c @@ -454,7 +454,7 @@ telnet_accept(const struct vev *ev, int what) return (0); } -int +void mgt_cli_telnet(int dflag, const char *T_arg) { struct vss_addr **ta; @@ -494,5 +494,4 @@ mgt_cli_telnet(int dflag, const char *T_arg) } free(addr); free(port); - return (0); } diff --git a/varnish-cache/bin/varnishd/mgt_vcc.c b/varnish-cache/bin/varnishd/mgt_vcc.c index c2aaa2f6..c782e719 100644 --- a/varnish-cache/bin/varnishd/mgt_vcc.c +++ b/varnish-cache/bin/varnishd/mgt_vcc.c @@ -263,7 +263,7 @@ mgt_run_cc(const char *vcl, struct vsb *sb, int C_flag) static char * mgt_VccCompile(struct vsb **sb, const char *b, int C_flag) { - char *vf = NULL; + char *vf; *sb = vsb_newauto(); XXXAN(*sb); diff --git a/varnish-cache/bin/varnishd/rfc2616.c b/varnish-cache/bin/varnishd/rfc2616.c index 1c5a2857..5a6c46fc 100644 --- a/varnish-cache/bin/varnishd/rfc2616.c +++ b/varnish-cache/bin/varnishd/rfc2616.c @@ -145,7 +145,7 @@ RFC2616_Ttl(const struct sess *sp, const struct http *hp, struct object *obj) * derive a relative time from the two headers. * (the negative ttl case is caught above) */ - ttl = (h_expires - h_date); + ttl = (int)(h_expires - h_date); } while (0);