Bug 216235

Summary: devel/silentbob: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: TAKATSU Tomonari <tota>
Status: Closed FIXED    
Severity: Affects Only Me CC: emaste, tcberner
Priority: --- Keywords: needs-patch
Version: LatestFlags: bugzilla: maintainer-feedback? (tota)
jbeich: merge-quarterly?
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215861
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216046
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216051
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216052
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216056
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216058
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216072
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216074
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216075
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216076
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216159
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216176
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216194
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216197
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216198
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216199
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216200
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216203
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216206
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216211
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216213
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216214
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216215
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216216
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216217
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216218
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216221
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216222
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216227
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216228
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216233
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216234
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216253
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216354
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216355
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216356
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216357
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216358
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216615
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216617
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216618
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216619
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216620
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216621
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216622
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216623
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216624
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216626
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216632
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216629
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216631
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216630
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216627
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216633
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216634
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216635
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216636
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216637
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216638
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216639
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216640
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216641
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216642
Bug Depends on:    
Bug Blocks: 216008    
Attachments:
Description Flags
patch, if the interpretation is correct... ^^ none

Description Jan Beich freebsd_committer 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 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 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 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