Commit 58e5907f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

A few edits for FlexeLint


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@383 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent df7b70b6
...@@ -51,7 +51,6 @@ struct http { ...@@ -51,7 +51,6 @@ struct http {
struct worker { struct worker {
struct event_base *eb; struct event_base *eb;
struct event e1, e2;
struct sbuf *sb; struct sbuf *sb;
struct objhead *nobjhead; struct objhead *nobjhead;
struct object *nobj; struct object *nobj;
......
...@@ -268,6 +268,8 @@ http_Dissect(struct http *hp, int fd, int rr) ...@@ -268,6 +268,8 @@ http_Dissect(struct http *hp, int fd, int rr)
p++; p++;
hp->nhdr = 0; hp->nhdr = 0;
r = NULL; /* For FlexeLint */
assert(p < hp->v); /* http_header_complete() guarantees this */
for (; p < hp->v; p = r) { for (; p < hp->v; p = r) {
q = strchr(p, '\n'); q = strchr(p, '\n');
assert(q != NULL); assert(q != NULL);
...@@ -331,7 +333,6 @@ static void ...@@ -331,7 +333,6 @@ static void
http_read_f(int fd, short event, void *arg) http_read_f(int fd, short event, void *arg)
{ {
struct http *hp = arg; struct http *hp = arg;
char *p;
unsigned l; unsigned l;
int i; int i;
...@@ -475,6 +476,7 @@ http_BuildSbuf(int fd, enum http_build mode, struct sbuf *sb, struct http *hp) ...@@ -475,6 +476,7 @@ http_BuildSbuf(int fd, enum http_build mode, struct sbuf *sb, struct http *hp)
sup = 1; sup = 1;
break; break;
default: default:
sup = 0; /* for flexelint */
printf("mode = %d\n", mode); printf("mode = %d\n", mode);
assert(mode == 1 || mode == 2); assert(mode == 1 || mode == 2);
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
struct varnish_stats *VSL_stats; struct varnish_stats *VSL_stats;
static struct shmloghead *loghead; static struct shmloghead *loghead;
static unsigned char *logstart, *logend; static unsigned char *logstart;
static pthread_mutex_t vsl_mutex; static pthread_mutex_t vsl_mutex;
/* /*
...@@ -88,7 +88,7 @@ VSL(enum shmlogtag tag, unsigned id, const char *fmt, ...) ...@@ -88,7 +88,7 @@ VSL(enum shmlogtag tag, unsigned id, const char *fmt, ...)
{ {
va_list ap; va_list ap;
unsigned char *p; unsigned char *p;
unsigned m, n; unsigned n;
va_start(ap, fmt); va_start(ap, fmt);
...@@ -132,7 +132,6 @@ VSL_Init(void) ...@@ -132,7 +132,6 @@ VSL_Init(void)
/* XXX check sanity of loghead */ /* XXX check sanity of loghead */
logstart = (unsigned char *)loghead + loghead->start; logstart = (unsigned char *)loghead + loghead->start;
logend = logstart + loghead->size;
VSL_stats = &loghead->stats; VSL_stats = &loghead->stats;
AZ(pthread_mutex_init(&vsl_mutex, NULL)); AZ(pthread_mutex_init(&vsl_mutex, NULL));
} }
......
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