Bug 207196 - www/uwsgi: fix build with clang 3.8.0
Summary: www/uwsgi: fix build with clang 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Sivachenko
URL:
Keywords:
Depends on:
Blocks: 206074
  Show dependency treegraph
 
Reported: 2016-02-14 22:01 UTC by Dimitry Andric
Modified: 2016-02-17 15:11 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (demon)


Attachments
Import upstream commit 2483e64 to fix loop warnings (2.80 KB, patch)
2016-02-14 22:02 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 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]
                i++;
                ^
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 freebsd_triage 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 freebsd_triage 2016-02-17 15:11:07 UTC
Committed, thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 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

Log:
  Add a patch from upstream to fix build with clang 3.8

  PR:		207196
  Submitted by:	dim

Changes:
  head/www/uwsgi/files/patch-2483e64.diff