aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2016-02-17 15:10:49 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2016-02-17 15:10:49 +0000
commitfbbb514751f218ab6c1925f0d6038a7e17ce2975 (patch)
tree487c4a0ee3a443aeb8809f78a8b3997f63a40fa6
parent3fe680c38c7b735fbac0159d6b51ff04f53d759c (diff)
downloadports-fbbb514751f218ab6c1925f0d6038a7e17ce2975.tar.gz
ports-fbbb514751f218ab6c1925f0d6038a7e17ce2975.zip
Add a patch from upstream to fix build with clang 3.8
PR: 207196 Submitted by: dim
Notes
Notes: svn path=/head/; revision=409050
-rw-r--r--www/uwsgi/files/patch-2483e64.diff61
1 files changed, 61 insertions, 0 deletions
diff --git a/www/uwsgi/files/patch-2483e64.diff b/www/uwsgi/files/patch-2483e64.diff
new file mode 100644
index 000000000000..c434e2eee9c5
--- /dev/null
+++ b/www/uwsgi/files/patch-2483e64.diff
@@ -0,0 +1,61 @@
+commit 2483e64e6dd504af5eefd4da94fc57c0f83b2563
+Author: Joerg Sonnenberger <joerg@NetBSD.org>
+Date: Wed Jan 13 17:00:53 2016 +0100
+
+ plugins: properly update loop indexes once
+
+ Fix clang warning about changing the loop variable in both loop
+ body and header
+
+diff --git plugins/cgi/cgi_plugin.c plugins/cgi/cgi_plugin.c
+index e4fe6e6..340886a 100644
+--- plugins/cgi/cgi_plugin.c
++++ plugins/cgi/cgi_plugin.c
+@@ -763,12 +763,11 @@ clear2:
+ }
+
+ // fill cgi env
+- for(i=0;i<wsgi_req->var_cnt;i++) {
++ for(i=0;i<wsgi_req->var_cnt;i+=2) {
+ // no need to free the putenv() memory
+ if (putenv(uwsgi_concat3n(wsgi_req->hvec[i].iov_base, wsgi_req->hvec[i].iov_len, "=", 1, wsgi_req->hvec[i+1].iov_base, wsgi_req->hvec[i+1].iov_len))) {
+ uwsgi_error("putenv()");
+ }
+- i++;
+ }
+
+
+diff --git plugins/gccgo/gccgo_plugin.c plugins/gccgo/gccgo_plugin.c
+index 09cfd69..98d8f71 100644
+--- plugins/gccgo/gccgo_plugin.c
++++ plugins/gccgo/gccgo_plugin.c
+@@ -233,9 +233,8 @@ static int uwsgi_gccgo_request(struct wsgi_request *wsgi_req) {
+
+ wsgi_req->async_environ = uwsgigo_env(wsgi_req);
+ int i;
+- for(i=0;i<wsgi_req->var_cnt;i++) {
++ for(i=0;i<wsgi_req->var_cnt;i+=2) {
+ uwsgigo_env_add(wsgi_req->async_environ, wsgi_req->hvec[i].iov_base, wsgi_req->hvec[i].iov_len, wsgi_req->hvec[i+1].iov_base, wsgi_req->hvec[i+1].iov_len);
+- i++;
+ }
+ uwsgigo_request(wsgi_req->async_environ, wsgi_req);
+ end:
+diff --git plugins/jwsgi/jwsgi_plugin.c plugins/jwsgi/jwsgi_plugin.c
+index 8cdac16..3b98632 100644
+--- plugins/jwsgi/jwsgi_plugin.c
++++ plugins/jwsgi/jwsgi_plugin.c
+@@ -71,13 +71,12 @@ static int uwsgi_jwsgi_request(struct wsgi_request *wsgi_req) {
+ if (!hm) return -1;
+
+ int i;
+- for(i=0;i<wsgi_req->var_cnt;i++) {
++ for(i=0;i<wsgi_req->var_cnt;i+=2) {
+ char *hk = wsgi_req->hvec[i].iov_base;
+ uint16_t hk_l = wsgi_req->hvec[i].iov_len;
+ char *hv = wsgi_req->hvec[i+1].iov_base;
+ uint16_t hv_l = wsgi_req->hvec[i+1].iov_len;
+ if (uwsgi_jwsgi_add_request_item(hm, hk, hk_l, hv, hv_l)) goto end;
+- i++;
+ }
+
+ if (uwsgi_jwsgi_add_request_input(hm, "jwsgi.input", 11)) goto end;