Commit ef51f0f2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make flexelint happier


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1061 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d87be45f
......@@ -124,8 +124,6 @@ struct worker {
};
struct workreq {
unsigned magic;
#define WORKREQ_MAGIC 0x5ccb4eb2
TAILQ_ENTRY(workreq) list;
struct sess *sess;
};
......@@ -342,7 +340,6 @@ void http_SetResp(struct worker *w, int fd, struct http *to, const char *proto,
void http_FilterHeader(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how);
void http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...);
void http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr);
int http_IsHdr(struct http_hdr *hh, char *hdr);
void http_Setup(struct http *ht, void *space, unsigned len);
int http_GetHdr(struct http *hp, const char *hdr, char **ptr);
int http_GetHdrField(struct http *hp, const char *hdr, const char *field, char **ptr);
......@@ -396,7 +393,6 @@ void VSL(enum shmlogtag tag, unsigned id, const char *fmt, ...);
void WSLR(struct worker *w, enum shmlogtag tag, unsigned id, const char *b, const char *e);
void WSL(struct worker *w, enum shmlogtag tag, unsigned id, const char *fmt, ...);
void WSL_Flush(struct worker *w);
#define HERE() VSL(SLT_Debug, 0, "HERE: %s(%d)", __func__, __LINE__)
#define INCOMPL() do { \
VSL(SLT_Debug, 0, "INCOMPLETE AT: %s(%d)", __func__, __LINE__); \
fprintf(stderr,"INCOMPLETE AT: %s(%d)\n", (const char *)__func__, __LINE__); \
......
......@@ -33,7 +33,7 @@ static struct kevent ki[NKEV];
static unsigned nki;
static void
vca_kq_sess(struct sess *sp, int arm)
vca_kq_sess(struct sess *sp, short arm)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
......
......@@ -35,7 +35,6 @@ DOT start -> RECV
#include <unistd.h>
#include "shmlog.h"
#include "heritage.h"
#include "vcl.h"
#include "cache.h"
......
......@@ -58,9 +58,6 @@ T(struct http *hp, enum httptag t)
return (logmtx[hp->logtag][t]);
}
#define VSLH(ax, bx, cx, dx) \
VSLR(T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e);
#define WSLH(wx, ax, bx, cx, dx) \
WSLR(wx, T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e);
......@@ -85,7 +82,7 @@ http_Setup(struct http *hp, void *space, unsigned len)
/*--------------------------------------------------------------------*/
int
static int
http_IsHdr(struct http_hdr *hh, char *hdr)
{
unsigned l;
......
......@@ -240,7 +240,7 @@ WRK_QueueSession(struct sess *sp)
struct worker *w;
pthread_t tp;
struct wq *qp;
static unsigned nq;
static unsigned nq = 0;
unsigned onq;
onq = nq + 1;
......
......@@ -76,7 +76,7 @@ static struct srcaddrhead {
MTX mtx;
} *srchash;
unsigned nsrchash;
static unsigned nsrchash;
static MTX stat_mtx;
/*--------------------------------------------------------------------
......
......@@ -21,9 +21,9 @@
#include <netinet/in.h>
static unsigned ipv4mask[] = {
static uint32_t ipv4mask[] = {
[0] = 0xffffffff,
#define M(n) [n] = (0xffffffff << (32 - n))
#define M(n) [n] = (uint32_t)((uint64_t)0xffffffff << (32 - n))
M( 1), M( 2), M( 3), M( 4), M( 5), M( 6), M( 7), M( 8), M( 9), M(10),
M(11), M(12), M(13), M(14), M(15), M(16), M(17), M(18), M(19), M(20),
M(21), M(22), M(23), M(24), M(25), M(26), M(27), M(28), M(29), M(30),
......
-passes=3
+libh mgt_event.h
+libh ../../config.h
-header(../../config.h)
......@@ -20,7 +21,9 @@
-e786 // String concatenation within initializer
-emacro(740, TAILQ_PREV) // Unusual pointer cast (incompatible indirect types)
-emacro(740, TAILQ_LAST) // Unusual pointer cast (incompatible indirect types)
-emacro((826), TAILQ_PREV) // Suspicious pointer-to-pointer conversion (area too small)
-emacro((826), TAILQ_LAST) // Suspicious pointer-to-pointer conversion (area too small)
-esym(534, printf) // Ignoring return value of function
......
......@@ -97,6 +97,7 @@ static void
start_child(void)
{
int i;
unsigned u;
char *p;
struct ev *e;
......@@ -170,7 +171,7 @@ start_child(void)
AZ(close(heritage.fds[2]));
heritage.fds[2] = -1;
child_pid = i;
if (mgt_push_vcls_and_start(&i, &p)) {
if (mgt_push_vcls_and_start(&u, &p)) {
fprintf(stderr, "Pushing vcls failed:\n%s\n", p);
free(p);
/* Pick up any stuff lingering on stdout/stderr */
......
......@@ -14,7 +14,6 @@
#include "mgt.h"
#include "mgt_cli.h"
#include "vsb.h"
#include "heritage.h"
struct parspec;
......@@ -308,10 +307,6 @@ tweak_srcaddr_ttl(struct cli *cli, struct parspec *par, const char *arg)
#define DELAYED_EFFECT \
"\nNB: This parameter will take some time to take effect.\n"
#define SHOULD_RESTART \
"\nNB: This parameter will not take full effect until the " \
"child process has been restarted.\n"
#define MUST_RESTART \
"\nNB: This parameter will not take any effect until the " \
"child process has been restarted.\n"
......
......@@ -107,8 +107,7 @@ VSL(enum shmlogtag tag, unsigned id, const char *fmt, ...)
va_start(ap, fmt);
p = strchr(fmt, '%');
if (p == NULL) {
if (strchr(fmt, '%') == NULL) {
VSLR(tag, id, fmt, NULL);
return;
}
......@@ -221,8 +220,7 @@ WSL(struct worker *w, enum shmlogtag tag, unsigned id, const char *fmt, ...)
va_start(ap, fmt);
p = strchr(fmt, '%');
if (p == NULL) {
if (strchr(fmt, '%') == NULL) {
WSLR(w, tag, id, fmt, NULL);
return;
}
......
......@@ -347,9 +347,9 @@ main(int argc, char *argv[])
setbuf(stderr, NULL);
memset(cli, 0, sizeof cli);
cli->sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND);
XXXAN(cli->sb);
cli->result = CLIS_OK;
cli[0].sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND);
XXXAN(cli[0].sb);
cli[0].result = CLIS_OK;
heritage.socket = -1;
memset(&param, 0, sizeof param);
......
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