Bug 207193 - palm/palm-db-tools: fix build with clang 3.8.0
Summary: palm/palm-db-tools: 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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 206074
  Show dependency treegraph
 
Reported: 2016-02-14 21:33 UTC by Dimitry Andric
Modified: 2016-02-19 03:45 UTC (History)
1 user (show)

See Also:


Attachments
Fix for loop increment (802 bytes, patch)
2016-02-14 21:33 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 21:33:39 UTC
Created attachment 166998 [details]
Fix for loop increment

During a recent exp-run for bug 206074, it was found that palm/palm-db-tools gives errors with clang 3.8.0 [1]:

DB.cpp:1328:21: error: variable 'j' used in loop condition not modified in loop body [-Werror,-Wfor-loop-analysis]
        for (j = 0; j < 31; i++) {
                    ^
Clang is right here, the loop should increment j, not i.  The attached patch makes it so.

[1] http://package22.nyi.freebsd.org/data/headamd64PR206074-default/2016-02-14_06h53m40s/logs/errors/palm-db-tools-0.3.6.log
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-02-19 03:45:30 UTC
A commit references this bug:

Author: mi
Date: Fri Feb 19 03:44:30 UTC 2016
New revision: 409149
URL: https://svnweb.freebsd.org/changeset/ports/409149

Log:
  Add a patch removing dead code -- a bug in it triggers an error
  with clang38.

  PR:		207193

Changes:
  head/palm/palm-db-tools/Makefile
  head/palm/palm-db-tools/files/patch-field_argumentf