Bug 207196

Summary: www/uwsgi: fix build with clang 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Dmitry Sivachenko <demon>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (demon)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 206074    
Description Flags
Import upstream commit 2483e64 to fix loop warnings none

Description Dimitry Andric freebsd_committer 2016-02-14 22:01:10 UTC
During a recent exp-run for bug 206074, it was found that www/uwsgi gives errors with clang 3.8.0 [1]:

/cgi_plugin.c:771:3: error: variable 'i' is incremented both in the loop header and in the loop body [-Werror,-Wfor-loop-analysis]
plugins/cgi/cgi_plugin.c:766:30: note: incremented here
        for(i=0;i<wsgi_req->var_cnt;i++) {

This new clang warning normally indicates some bug, but in this case upstream fixed it by explicitly increasing the counter by two. [2]

[1] http://package22.nyi.freebsd.org/data/headamd64PR206074-default/2016-02-14_06h53m40s/logs/errors/uwsgi-2.0.12_1.log
[2] https://github.com/unbit/uwsgi/commit/2483e64e6dd504af5eefd4da94fc57c0f83b2563
Comment 1 Dimitry Andric freebsd_committer 2016-02-14 22:02:47 UTC
Created attachment 167000 [details]
Import upstream commit 2483e64 to fix loop warnings
Comment 2 Dmitry Sivachenko freebsd_committer 2016-02-17 15:11:07 UTC
Committed, thanks!
Comment 3 commit-hook freebsd_committer 2016-02-17 15:11:44 UTC
A commit references this bug:

Author: demon
Date: Wed Feb 17 15:10:50 UTC 2016
New revision: 409050
URL: https://svnweb.freebsd.org/changeset/ports/409050

  Add a patch from upstream to fix build with clang 3.8

  PR:		207196
  Submitted by:	dim