From: des Date: Tue, 24 Apr 2007 12:37:58 +0000 (+0000) Subject: Eliminate warnings. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf1609d9c7ea3864312dfa33b555cad6ba2291dd;p=varnish Eliminate warnings. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1367 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor_epoll.c b/varnish-cache/bin/varnishd/cache_acceptor_epoll.c index be5796c1..3f22d61e 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor_epoll.c +++ b/varnish-cache/bin/varnishd/cache_acceptor_epoll.c @@ -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) { diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index c7dc74b7..d510dc85 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -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" diff --git a/varnish-cache/bin/varnishncsa/varnishncsa.c b/varnish-cache/bin/varnishncsa/varnishncsa.c index c237a87a..b04ebb8d 100644 --- a/varnish-cache/bin/varnishncsa/varnishncsa.c +++ b/varnish-cache/bin/varnishncsa/varnishncsa.c @@ -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'; diff --git a/varnish-cache/lib/libvarnishapi/shmlog.c b/varnish-cache/lib/libvarnishapi/shmlog.c index 98044771..4fe1e89f 100644 --- a/varnish-cache/lib/libvarnishapi/shmlog.c +++ b/varnish-cache/lib/libvarnishapi/shmlog.c @@ -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); } } diff --git a/varnish-cache/lib/libvcl/vcc_priv.h b/varnish-cache/lib/libvcl/vcc_priv.h index ece948a8..b2fc8147 100644 --- a/varnish-cache/lib/libvcl/vcc_priv.h +++ b/varnish-cache/lib/libvcl/vcc_priv.h @@ -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