From ac301e3be69ef38b7110a99aa945ed9ee18d3612 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 8 Jul 2006 20:29:31 +0000 Subject: [PATCH] A few edits for FlexeLint git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@383 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache.h | 1 - varnish-cache/bin/varnishd/cache_http.c | 4 +++- varnish-cache/bin/varnishd/cache_shmlog.c | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index fc6dfbbc..63a0822c 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -51,7 +51,6 @@ struct http { struct worker { struct event_base *eb; - struct event e1, e2; struct sbuf *sb; struct objhead *nobjhead; struct object *nobj; diff --git a/varnish-cache/bin/varnishd/cache_http.c b/varnish-cache/bin/varnishd/cache_http.c index 9d9f9596..46a0ee31 100644 --- a/varnish-cache/bin/varnishd/cache_http.c +++ b/varnish-cache/bin/varnishd/cache_http.c @@ -268,6 +268,8 @@ http_Dissect(struct http *hp, int fd, int rr) p++; hp->nhdr = 0; + r = NULL; /* For FlexeLint */ + assert(p < hp->v); /* http_header_complete() guarantees this */ for (; p < hp->v; p = r) { q = strchr(p, '\n'); assert(q != NULL); @@ -331,7 +333,6 @@ static void http_read_f(int fd, short event, void *arg) { struct http *hp = arg; - char *p; unsigned l; int i; @@ -475,6 +476,7 @@ http_BuildSbuf(int fd, enum http_build mode, struct sbuf *sb, struct http *hp) sup = 1; break; default: + sup = 0; /* for flexelint */ printf("mode = %d\n", mode); assert(mode == 1 || mode == 2); } diff --git a/varnish-cache/bin/varnishd/cache_shmlog.c b/varnish-cache/bin/varnishd/cache_shmlog.c index 8d333ca2..bf96093e 100644 --- a/varnish-cache/bin/varnishd/cache_shmlog.c +++ b/varnish-cache/bin/varnishd/cache_shmlog.c @@ -28,7 +28,7 @@ struct varnish_stats *VSL_stats; static struct shmloghead *loghead; -static unsigned char *logstart, *logend; +static unsigned char *logstart; static pthread_mutex_t vsl_mutex; /* @@ -88,7 +88,7 @@ VSL(enum shmlogtag tag, unsigned id, const char *fmt, ...) { va_list ap; unsigned char *p; - unsigned m, n; + unsigned n; va_start(ap, fmt); @@ -132,7 +132,6 @@ VSL_Init(void) /* XXX check sanity of loghead */ logstart = (unsigned char *)loghead + loghead->start; - logend = logstart + loghead->size; VSL_stats = &loghead->stats; AZ(pthread_mutex_init(&vsl_mutex, NULL)); } -- 2.39.5