]> err.no Git - varnish/commitdiff
A few edits for FlexeLint
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 8 Jul 2006 20:29:31 +0000 (20:29 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 8 Jul 2006 20:29:31 +0000 (20:29 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@383 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_http.c
varnish-cache/bin/varnishd/cache_shmlog.c

index fc6dfbbcf3f8536d30be68d8978e19fb637ff8b7..63a0822cfa28ee453bdeb7b2d89b397001d2284e 100644 (file)
@@ -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;
index 9d9f95960a345d57bc5320661c73a3aee2997e2a..46a0ee310865a67ea2044d51f8eea98da8410aa9 100644 (file)
@@ -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);
        }
index 8d333ca2c72a398dfe54b9c8c1eb85ce7b5feba5..bf96093e5cdc241055402bfe9b3cc7201e47f433 100644 (file)
@@ -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));
 }