Bug 216235 - devel/silentbob: fails to build with clang 4.0
Summary: devel/silentbob: fails to build with clang 4.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: TAKATSU Tomonari
URL:
Keywords: needs-patch
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-01-18 14:56 UTC by Jan Beich
Modified: 2017-01-31 04:25 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (tota)
jbeich: merge-quarterly?


Attachments
patch, if the interpretation is correct... ^^ (1.28 KB, patch)
2017-01-21 21:58 UTC, Tobias C. Berner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-01-18 14:56:23 UTC
src/wit.cxx:21:18: error: ordered comparison between pointer and zero ('int (*)(char *)' and 'int')
        if (words_count <= 0)
            ~~~~~~~~~~~ ^  ~

build log: http://sprunge.us/TaMA
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2017-01-21 21:58:17 UTC
Created attachment 179196 [details]
patch, if the interpretation is correct... ^^

I think this is a real bug in the code. 

There is a function 'words_count()' returning an int. 
The line above an int 'd_words_count = words_count(d_op)' is defined, and used in the following if for a comparison.

So I suspect, that the code there should actually read 'if (d_words_count <= 0)' -- see attached patch.


Though I defer to the maintainer to figure that one out :D
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-29 15:43:05 UTC
A commit references this bug:

Author: tota
Date: Sun Jan 29 15:42:47 UTC 2017
New revision: 432760
URL: https://svnweb.freebsd.org/changeset/ports/432760

Log:
  - Add patch-include_darray.h to fix typo
  - Rename patch-src-Sblib.cxx to patch-src_Sblib.cxx and
    regenerate with 'make makepatch'
  - Add patch-src_fs.cxx to enable Dposix_fadvise
  - Add patch-src_wit.cxx to fix fails to build with clang 4.0 [1]

  PR:		216235 [1]
  Submitted by:	jbeich@ [1]
  MFH:		2017Q1

Changes:
  head/devel/silentbob/Makefile
  head/devel/silentbob/files/patch-include_darray.h
  head/devel/silentbob/files/patch-src-Sblib.cxx
  head/devel/silentbob/files/patch-src_Sblib.cxx
  head/devel/silentbob/files/patch-src_fs.cxx
  head/devel/silentbob/files/patch-src_wit.cxx
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-01-31 04:25:42 UTC
A commit references this bug:

Author: tota
Date: Tue Jan 31 04:25:14 UTC 2017
New revision: 432899
URL: https://svnweb.freebsd.org/changeset/ports/432899

Log:
  MFH: r432760

  - Add patch-include_darray.h to fix typo
  - Rename patch-src-Sblib.cxx to patch-src_Sblib.cxx and
    regenerate with 'make makepatch'
  - Add patch-src_fs.cxx to enable Dposix_fadvise
  - Add patch-src_wit.cxx to fix fails to build with clang 4.0 [1]

  PR:		216235 [1]
  Submitted by:	jbeich@ [1]
  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/devel/silentbob/Makefile
  branches/2017Q1/devel/silentbob/files/patch-include_darray.h
  branches/2017Q1/devel/silentbob/files/patch-src-Sblib.cxx
  branches/2017Q1/devel/silentbob/files/patch-src_Sblib.cxx
  branches/2017Q1/devel/silentbob/files/patch-src_fs.cxx
  branches/2017Q1/devel/silentbob/files/patch-src_wit.cxx