From: phk Date: Mon, 18 Sep 2006 22:03:54 +0000 (+0000) Subject: Quench warnings. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85b1dd1a5cb7e54ee40f6281bcc8a9a52c931ef4;p=varnish Quench warnings. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1092 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvarnishapi/base64.c b/varnish-cache/lib/libvarnishapi/base64.c index 2f1b03bc..b4d3a906 100644 --- a/varnish-cache/lib/libvarnishapi/base64.c +++ b/varnish-cache/lib/libvarnishapi/base64.c @@ -6,6 +6,10 @@ * $Id$ */ +#include +#include +#include "varnishapi.h" + static const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -20,7 +24,7 @@ base64_init(void) for (i = 0; i < 256; i++) i64[i] = -1; for (p = b64, i = 0; *p; p++, i++) - i64[*p] = i; + i64[(int)*p] = i; i64['='] = 0; } @@ -30,12 +34,13 @@ base64_decode(char *d, unsigned dlen, const char *s) unsigned u, v, l; int i; + u = 0; l = 0; while (*s) { for (v = 0; v < 4; v++) { if (!*s) break; - i = i64[*s++]; + i = i64[(int)*s++]; if (i < 0) return (-1); u <<= 6; @@ -50,7 +55,6 @@ base64_decode(char *d, unsigned dlen, const char *s) d++; } } - printf("\n"); *d = '\0'; return (0); }