Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 2016 15:10:50 +0000 (UTC)
From:      Dmitry Sivachenko <demon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r409050 - head/www/uwsgi/files
Message-ID:  <201602171510.u1HFAoq7061416@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: demon
Date: Wed Feb 17 15:10:49 2016
New Revision: 409050
URL: https://svnweb.freebsd.org/changeset/ports/409050

Log:
  Add a patch from upstream to fix build with clang 3.8
  
  PR:		207196
  Submitted by:	dim

Added:
  head/www/uwsgi/files/patch-2483e64.diff   (contents, props changed)

Added: head/www/uwsgi/files/patch-2483e64.diff
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/uwsgi/files/patch-2483e64.diff	Wed Feb 17 15:10:49 2016	(r409050)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602171510.u1HFAoq7061416>