[master] c6505ab Flexelintery
Poul-Henning Kamp
phk at FreeBSD.org
Wed Apr 26 13:22:06 CEST 2017
commit c6505ab9f242e82f547479b9a1aaef5d5a3afcd3
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Apr 25 06:56:26 2017 +0000
Flexelintery
diff --git a/lib/libvarnish/flint.lnt b/lib/libvarnish/flint.lnt
index 5755730..77a2a2d 100644
--- a/lib/libvarnish/flint.lnt
+++ b/lib/libvarnish/flint.lnt
@@ -1,6 +1,10 @@
+libh mgt_event.h
+libh ../../config.h
++fan // Allow anon unions
+
+-dVARNISH_STATE_DIR="foo"
+
-emacro((???),va_arg) // the va_arg() macro can yield 415, 416, 661, 662
// 796 and 797 (out-of-bounds errors).
-elib(123) // size is both a variable and a macro with args
diff --git a/lib/libvarnish/vav.c b/lib/libvarnish/vav.c
index d39932f..51a7ef6 100644
--- a/lib/libvarnish/vav.c
+++ b/lib/libvarnish/vav.c
@@ -112,7 +112,7 @@ VAV_BackSlashDecode(const char *s, const char *e)
if (e == NULL)
e = strchr(s, '\0');
assert(e != NULL);
- p = calloc((e - s) + 1, 1);
+ p = calloc((e - s) + 1L, 1);
if (p == NULL)
return (p);
for (r = p, q = s; q < e; ) {
@@ -193,7 +193,7 @@ VAV_Parse(const char *s, int *argc, int flag)
assert(argv != NULL);
}
if (flag & ARGV_NOESC) {
- argv[nargv] = malloc(1 + (s - p));
+ argv[nargv] = malloc(1L + (s - p));
assert(argv[nargv] != NULL);
memcpy(argv[nargv], p, s - p);
argv[nargv][s - p] = '\0';
diff --git a/lib/libvarnish/vpf.c b/lib/libvarnish/vpf.c
index 7883adb..a5fd683 100644
--- a/lib/libvarnish/vpf.c
+++ b/lib/libvarnish/vpf.c
@@ -188,7 +188,7 @@ VPF_Write(struct vpf_fh *pfh)
return (-1);
}
- error = snprintf(pidstr, sizeof(pidstr), "%ju", (uintmax_t)getpid());
+ error = snprintf(pidstr, sizeof(pidstr), "%jd", (intmax_t)getpid());
assert(error < sizeof pidstr);
if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) {
error = errno;
diff --git a/lib/libvarnish/vsa.c b/lib/libvarnish/vsa.c
index c6fcac2..c2e157b 100644
--- a/lib/libvarnish/vsa.c
+++ b/lib/libvarnish/vsa.c
@@ -333,9 +333,9 @@ VSA_Compare_IP(const struct suckaddr *sua1, const struct suckaddr *sua2)
case PF_INET6:
return (memcmp(&sua1->sa6.sin6_addr,
&sua2->sa6.sin6_addr, sizeof(struct in6_addr)));
+ default:
+ WRONG("Just plain insane");
}
-
- WRONG("Just plain insane");
NEEDLESS(return(-1));
}
More information about the varnish-commit
mailing list