]> err.no Git - varnish/commitdiff
Eliminate warnings.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 24 Apr 2007 12:37:58 +0000 (12:37 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 24 Apr 2007 12:37:58 +0000 (12:37 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1367 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor_epoll.c
varnish-cache/bin/varnishd/cache_center.c
varnish-cache/bin/varnishncsa/varnishncsa.c
varnish-cache/lib/libvarnishapi/shmlog.c
varnish-cache/lib/libvcl/vcc_priv.h

index be5796c143c4b71f9046700793edff24425525be..3f22d61ef496af468863790bdf161857cd57fd3c 100644 (file)
@@ -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)
 {
index c7dc74b7b604473eb585eca8c99ba1b8f137866b..d510dc859436cdf6f8cd9bec06815b8b7941caad 100644 (file)
@@ -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"
index c237a87a2f9d7af1dd0cace08490f601685bdc4e..b04ebb8d227a92f33d7a5c0c833b6c9cfe8ba322 100644 (file)
@@ -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';
index 9804477153c99a45aa6508935adf0c8c67979487..4fe1e89f0d1e3189f3f3aa6e0d0888d42b0a5d26 100644 (file)
@@ -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);
        }
 }
index ece948a812f6e3b6e04dea6cb65a2531ab0a79c5..b2fc814771f31878ce2e951d9938fbd48b0cd8e4 100644 (file)
@@ -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