=== bin/varnishd/cache_acceptor.c
==================================================================
--- bin/varnishd/cache_acceptor.c	(revision 24653)
+++ bin/varnishd/cache_acceptor.c	(local)
@@ -69,7 +69,7 @@
 }
 
 static void
-accept_f(int fd, short event, void *arg __unused)
+accept_f(int fd, short event, void *arg)
 {
 	socklen_t l;
 	struct sessmem *sm;
@@ -77,6 +77,7 @@
 	struct sess *sp;
 	char port[10];
 
+	(void)arg;
 	sm = calloc(sizeof *sm, 1);
 	assert(sm != NULL);	/*
 				 * XXX: this is probably one we should handle
=== include/cli_priv.h
==================================================================
--- include/cli_priv.h	(revision 24653)
+++ include/cli_priv.h	(local)
@@ -11,7 +11,7 @@
 
 struct cli;	/* NB: struct cli is opaque at this level.  */
 
-typedef void cli_func_t(struct cli*, char **av, void *priv);
+typedef void cli_func_t(struct cli*, const char **av, void *priv);
 
 struct cli_proto {
 	/* These must match the CLI_* macros in cli.h */
=== include/libvarnish.h
==================================================================
--- include/libvarnish.h	(revision 24653)
+++ include/libvarnish.h	(local)
@@ -3,10 +3,9 @@
  */
 
 /* from libvarnish/argv.c */
-void FreeArgv(char **argv);
-char **ParseArgv(const char *s, int comment);
+void FreeArgv(const char **argv);
+const char **ParseArgv(const char *s, int comment);
 
 
 /* Assert zero return value */
 #define AZ(foo)	do { assert((foo) == 0); } while (0)
-
=== lib/libvarnish/argv.c
==================================================================
--- lib/libvarnish/argv.c	(revision 24653)
+++ lib/libvarnish/argv.c	(local)
@@ -1,12 +1,12 @@
 /*
  * $Id$
  *
- * char **ParseArgv(const char *s, int comment)
+ * const char **ParseArgv(const char *s, int comment)
  *	Parse a command like line into an argv[]
  *	Index zero contains NULL or an error message
  *	"double quotes" and backslash substitution is handled.
  *
- * void FreeArgv(char **argv)
+ * void FreeArgv(const char **argv)
  *	Free the result of ParseArgv()
  *
  */
@@ -48,15 +48,15 @@
 		i = '\\';
 		r = 2;
 		break;
-	case '0': case '1': case '2': case 3:
-	case '4': case '5': case '6': case 7:
+	case '0': case '1': case '2': case '3':
+	case '4': case '5': case '6': case '7':
 		for (r = 1; r < 4; r++) {
 			if (!isdigit(s[r]))
 				break;
-			if (digittoint(s[r]) > 7)
+			if (s[r] - '0' > 7)
 				break;
 			i <<= 3;
-			i |= digittoint(s[r]);
+			i |= s[r] - '0';
 		}
 		break;
 	case 'x':
@@ -96,10 +96,10 @@
 	return (p);
 }
 
-char **
+const char **
 ParseArgv(const char *s, int comment)
 {
-	char **argv;
+	const char **argv;
 	const char *p;
 	int nargv, largv;
 	int i, quote;
@@ -131,8 +131,7 @@
 			if (*s == '\\') {
 				i = BackSlash(s, NULL);
 				if (i == 0) {
-					argv[0] = __DECONST(void *,
-					    "Illegal backslash sequence");
+					argv[0] = "Illegal backslash sequence";
 					return (argv);
 				}
 				s += i;
@@ -147,8 +146,7 @@
 			if (*s == '"')
 				break;
 			if (*s == '\0') {
-				argv[0] = __DECONST(void *,
-				    "Missing '\"'");
+				argv[0] = "Missing '\"'";
 				return (argv);
 			}
 			s++;
@@ -166,12 +164,12 @@
 }
 
 void
-FreeArgv(char **argv)
+FreeArgv(const char **argv)
 {
 	int i;
 	
 	for (i = 1; argv[i] != NULL; i++)
-		free(argv[i]);
+		free((void *)(uintptr_t)argv[i]);
 	free(argv);
 }
 
=== lib/libvarnish/cli.c
==================================================================
--- lib/libvarnish/cli.c	(revision 24653)
+++ lib/libvarnish/cli.c	(local)
@@ -19,7 +19,7 @@
  */
 
 void
-cli_func_help(struct cli *cli, char **av, void *priv)
+cli_func_help(struct cli *cli, const char **av, void *priv)
 {
 	struct cli_proto *cp;
 
@@ -41,7 +41,7 @@
 void
 cli_dispatch(struct cli *cli, struct cli_proto *clp, const char *line)
 {
-	char **av;
+	const char **av;
 	unsigned u;
 	struct cli_proto *cp;
 
=== lib/libvcl/vcl_compile.c
==================================================================
--- lib/libvcl/vcl_compile.c	(revision 24653)
+++ lib/libvcl/vcl_compile.c	(local)
@@ -33,22 +33,22 @@
  *	and all the rest...
  */
 
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+
 #include <assert.h>
-#include <string.h>
 #include <ctype.h>
-#include <unistd.h>
+#include <errno.h>
 #include <fcntl.h>
-#include <errno.h>
+#include <netdb.h>
+#include <sbuf.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/sbuf.h>
-#include <sys/stat.h>
-#include <sys/queue.h>
+#include <string.h>
+#include <queue.h>
+#include <unistd.h>
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-
 #include "vcl_priv.h"
 
 #include "libvcl.h"
@@ -316,15 +316,15 @@
 		case 'b':	*q++ = '\b';	r += 2; break;
 		case '0': case '1': case '2': case '3':
 		case '4': case '5': case '6': case '7':
-			u = digittoint(r[1]);
+			u = r[1] - '0';
 			r += 2;
-			if (isdigit(r[0]) && digittoint(r[0]) < 8) {
+			if (isdigit(r[0]) && (r[0] - '0') < 8) {
 				u <<= 3;
-				u |= digittoint(r[0]);
+				u |= r[0] - '0';
 				r++;
-				if (isdigit(r[0]) && digittoint(r[0]) < 8) {
+				if (isdigit(r[0]) && (r[0] - '0') < 8) {
 					u <<= 3;
-					u |= digittoint(r[0]);
+					u |= r[0] - '0';
 					r++;
 				}
 			}
@@ -471,7 +471,7 @@
 	Expect(tl, CNUM);
 	for (p = tl->t->b; p < tl->t->e; p++) {
 		d *= 10;
-		d += digittoint(*p);
+		d += *p - '0';
 	}
 	NextToken(tl);
 	return (d);
@@ -490,7 +490,7 @@
 	Expect(tl, CNUM);
 	for (p = tl->t->b; p < tl->t->e; p++) {
 		d *= 10;
-		d += digittoint(*p);
+		d += *p - '0';
 	}
 	NextToken(tl);
 	if (tl->t->tok != '.') 
@@ -499,7 +499,7 @@
 	if (tl->t->tok != CNUM)
 		return (d);
 	for (p = tl->t->b; p < tl->t->e; p++) {
-		d += digittoint(*p) * e;
+		d += (*p - '0') * e;
 		e *= 0.1;
 	}
 	NextToken(tl);
@@ -645,9 +645,10 @@
 }
 
 static void
-Cond_String(struct var *vp __unused, struct tokenlist *tl)
+Cond_String(struct var *vp, struct tokenlist *tl)
 {
 
+	(void)vp;
 	switch (tl->t->tok) {
 	case '~':
 		I(tl); sbuf_printf(tl->fc, "string_match(%s, ", vp->cname);
