[master] e1e7651 The "good" inline-C we use should not make the compiler whine.

Poul-Henning Kamp phk at varnish-cache.org
Tue Nov 12 20:05:49 CET 2013


commit e1e7651eeffbdfdadebd293338041629ce90d5e4
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Nov 12 19:05:13 2013 +0000

    The "good" inline-C we use should not make the compiler whine.

diff --git a/bin/varnishtest/tests/c00052.vtc b/bin/varnishtest/tests/c00052.vtc
index 6ff5815..6453a80 100644
--- a/bin/varnishtest/tests/c00052.vtc
+++ b/bin/varnishtest/tests/c00052.vtc
@@ -10,7 +10,7 @@ varnish v1
 varnish v1 -cliok "param.set vcc_allow_inline_c true"
 
 varnish v1 -vcl+backend {
-	C{ getpid(); }C
+	C{ /*...*/ }C
 }
 
 varnish v1 -cliok "param.set vcc_allow_inline_c false"
@@ -19,7 +19,7 @@ varnish v1 -errvcl {Inline-C not allowed} {
 	backend default {
 		.host = "${s1_sock}";
 	}
-	C{ getpid(); }C
+	C{ /*...*/ }C
 }
 
 varnish v1 -errvcl {Inline-C not allowed} {
@@ -27,7 +27,7 @@ varnish v1 -errvcl {Inline-C not allowed} {
 		.host = "${s1_sock}";
 	}
 	sub vcl_recv {
-		C{ getpid(); }C
+		C{ /*...*/ }C
 	}
 }
 
@@ -35,12 +35,12 @@ varnish v1 -cliok "param.set vcc_allow_inline_c true"
 
 varnish v1 -vcl+backend {
 	sub vcl_recv {
-		C{ getpid(); }C
+		C{ /*...*/ }C
 	}
 }
 
 varnish v1 -vcl+backend {
-	C{ extern int getpid(); }C
+	C{ /*...*/ }C
 }
 
 varnish v1 -start
diff --git a/bin/varnishtest/tests/c00057.vtc b/bin/varnishtest/tests/c00057.vtc
index 55c478e..1aebac1 100644
--- a/bin/varnishtest/tests/c00057.vtc
+++ b/bin/varnishtest/tests/c00057.vtc
@@ -11,6 +11,7 @@ varnish v1 -vcl+backend {
 	C{
 #include <signal.h>
 #include <stdlib.h>
+#include <unistd.h>
 }C
 	sub vcl_recv { C{ raise(SIGSEGV); sleep(2); }C }
 } -start
diff --git a/bin/varnishtest/tests/r00742.vtc b/bin/varnishtest/tests/r00742.vtc
index 1a4dbb5..91421a3 100644
--- a/bin/varnishtest/tests/r00742.vtc
+++ b/bin/varnishtest/tests/r00742.vtc
@@ -7,6 +7,7 @@ server s1 {
 
 varnish v1 -cliok "param.set vcc_allow_inline_c true" -vcl+backend {
 	C{
+	#include <stdio.h>
 	void foo(void)
 	{
 		printf("%s %s %s", "foo", "bar", "barf");



More information about the varnish-commit mailing list