varnish/varnish-6.2.0_el6_fix_warning_from_old_gcc.patch

74 lines
2.5 KiB
Diff
Raw Normal View History

--- bin/varnishtest/vtc_main.c.orig 2019-03-15 12:31:56.999877378 +0100
+++ bin/varnishtest/vtc_main.c 2019-03-15 12:33:07.679889311 +0100
@@ -228,7 +228,7 @@
assert(cleaner_pid >= 0);
if (cleaner_pid == 0) {
closefd(&p[1]);
- (void)nice(1); /* Not important */
+ if (nice(1)) 1; /* Not important */
setbuf(stdin, NULL);
AZ(dup2(p[0], STDIN_FILENO));
while (fgets(buf, sizeof buf, stdin)) {
--- lib/libvarnishapi/vsm.c.orig 2019-03-18 13:24:01.377237092 +0100
+++ lib/libvarnishapi/vsm.c 2019-03-18 13:24:42.765783845 +0100
@@ -682,18 +682,18 @@
VSM_ResetError(vd);
if (u & VSM_MGT_RUNNING) {
if (progress >= 0 && n > 4)
- (void)write(progress, "\n", 1);
+ if (write(progress, "\n", 1)) 1;
vd->attached = 1;
return (0);
}
if (t0 < VTIM_mono()) {
if (progress >= 0 && n > 4)
- (void)write(progress, "\n", 1);
+ if (write(progress, "\n", 1)) 1;
return (vsm_diag(vd,
"Could not get hold of varnishd, is it running?"));
}
if (progress >= 0 && !(++n % 4))
- (void)write(progress, ".", 1);
+ if (write(progress, ".", 1)) 1;
VTIM_sleep(.25);
}
return (vsm_diag(vd, "Attach interrupted"));
--- bin/varnishd/http1/cache_http1_deliver.c.orig 2019-03-18 13:30:43.262546105 +0100
+++ bin/varnishd/http1/cache_http1_deliver.c 2019-03-18 14:12:48.980850397 +0100
@@ -74,7 +74,7 @@
VSLb(req->vsl, SLT_RespReason, "Internal Server Error");
req->wrk->stats->client_resp_500++;
- (void)write(req->sp->fd, r_500, sizeof r_500 - 1);
+ if (write(req->sp->fd, r_500, sizeof r_500 - 1)) 0;
req->doclose = SC_TX_EOF;
}
--- ./bin/varnishd/mgt/mgt_param.c.orig 2019-03-18 14:48:56.084720420 +0100
+++ ./bin/varnishd/mgt/mgt_param.c 2019-03-18 14:51:25.867836687 +0100
@@ -802,11 +802,11 @@
t2 = strchr(t1 + 1, '\t');
AN(t2);
printf("\n\t*");
- (void)fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout);
+ if (fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout)) 1;
printf("*\n\t\t");
p = t2 + 1;
}
- (void)fwrite(p, q - p, 1, stdout);
+ if (fwrite(p, q - p, 1, stdout)) 1;
p = q;
if (*p == '\n') {
printf("\n");
--- ./bin/varnishd/proxy/cache_proxy_proto.c.orig 2019-03-18 14:54:18.257283901 +0100
+++ ./bin/varnishd/proxy/cache_proxy_proto.c 2019-03-18 14:54:47.119693630 +0100
@@ -669,7 +669,7 @@
WRONG("Wrong proxy version");
AZ(VSB_finish(vsb));
- (void)write(fd, VSB_data(vsb), VSB_len(vsb));
+ if (write(fd, VSB_data(vsb), VSB_len(vsb))) 1;
if (!DO_DEBUG(DBG_PROTOCOL)) {
VSB_delete(vsb);
return;