Commit 6aac262f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Polish things to silence FlexeLint a bit


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@213 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f2ef1b71
......@@ -60,7 +60,6 @@ extern struct stevedore *stevedore;
/* Storage -----------------------------------------------------------*/
struct sess;
typedef void sesscb_f(struct sess *sp);
#define VCA_ADDRBUFSIZE 32
......@@ -99,8 +98,6 @@ struct sess {
TAILQ_ENTRY(sess) list;
sesscb_f *sesscb;
struct backend *backend;
struct object *obj;
struct VCL_conf *vcl;
......@@ -113,12 +110,14 @@ struct sess {
struct backend {
const char *hostname;
const char *portname;
struct addrinfo *addr;
unsigned ip;
#if 0
struct addrinfo *addr;
double responsetime;
double timeout;
double bandwidth;
int down;
#endif
/* internal stuff */
struct vbe *vbe;
......@@ -138,7 +137,6 @@ void VCA_Init(void);
/* cache_backend.c */
void VBE_Init(void);
int VBE_GetFd(struct backend *bp, void **ptr);
void VBE_Pass(struct sess *sp);
void VBE_ClosedFd(void *ptr);
void VBE_RecycleFd(void *ptr);
......
......@@ -78,7 +78,7 @@ static int vbe_pipe[2];
* be a good thing in that case.
*/
void
static void
connect_to_backend(struct vbe_conn *vc, struct backend *bp)
{
struct addrinfo *res, *res0, hint;
......
......@@ -139,6 +139,7 @@ fetch_chunked(struct worker *w, struct sess *sp, int fd, struct http *hp)
i = bp - q;
if (i == 0) {
} else if (v > i) {
assert(i > 0);
memcpy(p, q, i);
p += i;
st->len += i;
......
......@@ -35,7 +35,7 @@ static void
timer_keepalive(int a, short b, void *c)
{
printf("%s(%d, %d, %p)\n", __func__, a, b, c);
printf("%s(%d, %d, %p)\n", __func__, a, (int)b, c);
printf("Heeellloooo ? Ohh bother...\n");
exit (1);
}
......
......@@ -44,7 +44,7 @@ rdf(int fd, short event, void *arg)
void
PipeSession(struct worker *w, struct sess *sp)
{
int fd, i, j;
int fd, i;
void *fd_token;
struct edir e1, e2;
......@@ -55,13 +55,15 @@ PipeSession(struct worker *w, struct sess *sp)
i = write(fd, sbuf_data(w->sb), sbuf_len(w->sb));
assert(i == sbuf_len(w->sb));
assert(__LINE__ == 0);
j = 0;
#if 0
{ int j;
j = 0;
i = sp->rcv_len - sp->rcv_ptr;
if (i > 0) {
j = write(sp->fd, sp->rcv + sp->rcv_ptr, i);
assert(j == i);
}
}
#endif
e1.fd = fd;
......
......@@ -23,7 +23,6 @@ static unsigned char *logstart, *logend;
void
VSLR(enum shmlogtag tag, unsigned id, const char *b, const char *e)
{
va_list ap;
unsigned char *p, *q;
assert(b != NULL);
......@@ -58,8 +57,6 @@ VSLR(enum shmlogtag tag, unsigned id, const char *b, const char *e)
loghead->ptr = (p + 4 + (e - b)) - logstart;
/* XXX: Unlock */
va_end(ap);
}
......
......@@ -120,7 +120,7 @@ wrcb(struct bufferevent *bev, void *arg)
static void
excb(struct bufferevent *bev, short what, void *arg)
{
printf("%s(%p, %d, %p)\n", __func__, (void*)bev, what, arg);
printf("%s(%p, %d, %p)\n", __func__, (void*)bev, (int)what, arg);
}
struct cli *
......
......@@ -4,6 +4,7 @@
-printf_code( H, void *, unsigned)
-printf_code( ju, long long unsigned)
-printf_code( jx, long long unsigned)
-e763 // Redundant declaration for symbol '...' previously declared
......
......@@ -48,7 +48,7 @@ TAILQ_HEAD(smfhead, smf);
struct smf_sc {
char *filename;
int fd;
int pagesize;
unsigned pagesize;
uintmax_t filesize;
struct smfhead order;
struct smfhead free;
......@@ -481,7 +481,7 @@ smf_free(struct storage *s)
{
struct smf *smf;
smf = s->priv;
smf = (struct smf *)(s->priv);
free_smf(smf);
}
......
......@@ -38,7 +38,7 @@ struct event_base *mgt_eb;
* Generic passthrough for CLI functions
*/
void
static void
cli_passthrough_cb(unsigned u, const char *r, void *priv)
{
struct cli *cli = priv;
......@@ -319,11 +319,13 @@ setup_storage(const char *sflag)
const char *p, *q;
struct stevedore *stp;
q = p = strchr(sflag, ',');
p = strchr(sflag, ',');
if (p == NULL)
q = p = strchr(sflag, '\0');
else
q++;
q = p + 1;
assert(p != NULL);
assert(q != NULL);
if (!cmp_storage(&sma_stevedore, sflag, p)) {
stp = &sma_stevedore;
} else if (!cmp_storage(&smf_stevedore, sflag, p)) {
......
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