Bug 207193

Summary: palm/palm-db-tools: fix build with clang 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: mi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 206074    
Attachments:
Description Flags
Fix for loop increment none

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