r383 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sat Jul 8 22:29:31 CEST 2006
Author: phk
Date: 2006-07-08 22:29:31 +0200 (Sat, 08 Jul 2006)
New Revision: 383
Modified:
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/cache_http.c
trunk/varnish-cache/bin/varnishd/cache_shmlog.c
Log:
A few edits for FlexeLint
Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2006-07-08 20:19:17 UTC (rev 382)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2006-07-08 20:29:31 UTC (rev 383)
@@ -51,7 +51,6 @@
struct worker {
struct event_base *eb;
- struct event e1, e2;
struct sbuf *sb;
struct objhead *nobjhead;
struct object *nobj;
Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-07-08 20:19:17 UTC (rev 382)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-07-08 20:29:31 UTC (rev 383)
@@ -268,6 +268,8 @@
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 @@
http_read_f(int fd, short event, void *arg)
{
struct http *hp = arg;
- char *p;
unsigned l;
int i;
@@ -475,6 +476,7 @@
sup = 1;
break;
default:
+ sup = 0; /* for flexelint */
printf("mode = %d\n", mode);
assert(mode == 1 || mode == 2);
}
Modified: trunk/varnish-cache/bin/varnishd/cache_shmlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_shmlog.c 2006-07-08 20:19:17 UTC (rev 382)
+++ trunk/varnish-cache/bin/varnishd/cache_shmlog.c 2006-07-08 20:29:31 UTC (rev 383)
@@ -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 @@
{
va_list ap;
unsigned char *p;
- unsigned m, n;
+ unsigned n;
va_start(ap, fmt);
@@ -132,7 +132,6 @@
/* 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));
}
More information about the varnish-commit
mailing list