Commit cbfc7891 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Eliminate warnings.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1367 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f26dc33f
......@@ -70,13 +70,6 @@ vca_del(int fd)
AZ(epoll_ctl(epfd, EPOLL_CTL_DEL, fd, &ev));
}
static void
vca_rcvhdev(struct sess *sp)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
}
static void *
vca_main(void *arg)
{
......
......@@ -74,6 +74,10 @@ DOT start -> RECV [style=bold,color=green,weight=4]
#include "compat/clock_gettime.h"
#endif
#ifndef HAVE_SRANDOMDEV
#include "compat/srandomdev.h"
#endif
#include "shmlog.h"
#include "vcl.h"
#include "cache.h"
......
......@@ -278,13 +278,13 @@ h_ncsa(void *priv, unsigned tag, unsigned fd,
/* %u: decode authorization string */
if (lp->df_u != NULL) {
char *rubuf;
size_t len;
size_t rulen;
base64_init();
len = ((strlen(lp->df_u) + 3) * 4) / 3;
rubuf = malloc(len);
rulen = ((strlen(lp->df_u) + 3) * 4) / 3;
rubuf = malloc(rulen);
assert(rubuf != NULL);
base64_decode(rubuf, len, lp->df_u);
base64_decode(rubuf, rulen, lp->df_u);
q = strchr(rubuf, ':');
if (q != NULL)
*q = '\0';
......
......@@ -284,14 +284,14 @@ VSL_NextLog(struct VSL_data *vd, unsigned char **pp)
if (vd->regincl != NULL) {
rm.rm_so = 0;
rm.rm_eo = p[1];
i = regexec(vd->regincl, p + 4, 1, &rm, 0);
i = regexec(vd->regincl, (char *)p + 4, 1, &rm, 0);
if (i == REG_NOMATCH)
continue;
}
if (vd->regexcl != NULL) {
rm.rm_so = 0;
rm.rm_eo = p[1];
i = regexec(vd->regexcl, p + 4, 1, &rm, 0);
i = regexec(vd->regexcl, (char *)p + 4, 1, &rm, 0);
if (i != REG_NOMATCH)
continue;
}
......@@ -318,7 +318,7 @@ VSL_Dispatch(struct VSL_data *vd, vsl_handler *func, void *priv)
if (func(priv,
p[0], u, p[1],
vd->map[u] & (VSL_S_CLIENT|VSL_S_BACKEND),
p + 4))
(char *)p + 4))
return (1);
}
}
......
......@@ -43,4 +43,4 @@ extern const char *vcl_tnames[256];
void vcl_init_tnames(void);
void vcl_output_lang_h(struct vsb *sb);
#define PF(t) ((t)->e - (t)->b), (t)->b
#define PF(t) (int)((t)->e - (t)->b), (t)->b
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