Bug 216052

Summary: comms/telldus-core: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: needs-patch
Priority: --- Flags: bugzilla: maintainer-feedback? (johan)
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216019
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=216051
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216046
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=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=216235
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=216627
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216629
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216630
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216631
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216632
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
clang4 build patch
johan: maintainer-approval+
Improved pkg-plist johan: maintainer-approval+

Description Jan Beich freebsd_committer freebsd_triage 2017-01-14 04:52:39 UTC
service/SettingsConfuse.cpp:47:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
        if (d->cfg > 0) {
            ~~~~~~ ^ ~
service/SettingsConfuse.cpp:50:17: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
        if (d->var_cfg > 0) {
            ~~~~~~~~~~ ^ ~
service/SettingsConfuse.cpp:61:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
        if (d->cfg > 0) {
            ~~~~~~ ^ ~
service/SettingsConfuse.cpp:73:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
        if (d->cfg > 0) {
            ~~~~~~ ^ ~

build log: http://sprunge.us/ZeWh
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Johan Ström 2017-01-18 20:56:29 UTC
Created attachment 179050 [details]
clang4 build patch
Comment 2 Johan Ström 2017-01-18 20:57:09 UTC
Created attachment 179051 [details]
Improved pkg-plist

Replaces @exec with @pre/postexec
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-01-18 21:35:23 UTC
A commit references this bug:

Author: jbeich
Date: Wed Jan 18 21:34:42 UTC 2017
New revision: 431828
URL: https://svnweb.freebsd.org/changeset/ports/431828

Log:
  comms/telldus-core: unbreak with clang 4.0

  service/SettingsConfuse.cpp:47:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
          if (d->cfg > 0) {
              ~~~~~~ ^ ~
  service/SettingsConfuse.cpp:50:17: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
          if (d->var_cfg > 0) {
              ~~~~~~~~~~ ^ ~
  service/SettingsConfuse.cpp:61:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
          if (d->cfg > 0) {
              ~~~~~~ ^ ~
  service/SettingsConfuse.cpp:73:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
          if (d->cfg > 0) {
              ~~~~~~ ^ ~

  PR:		216052
  Submitted by:	Johan Str?m (maintainer)

Changes:
  head/comms/telldus-core/files/patch-service-SettingsConfuse.cpp
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-01-18 22:09:40 UTC
Comment on attachment 179051 [details]
Improved pkg-plist

Can you move this into a separate bug? I can't review this atm but...

- install -d is redundant with @dir
- @* keywords can set mode and owner, see /usr/ports/CHANGES from 20140922
- why not @sample empty vendor config instead of @*exec it from scratch

Note, @sample is implemented by /usr/ports/Keywords/sample.ucl
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-01-19 05:21:38 UTC
A commit references this bug:

Author: jbeich
Date: Thu Jan 19 05:21:23 UTC 2017
New revision: 431845
URL: https://svnweb.freebsd.org/changeset/ports/431845

Log:
  MFH: r431828

  comms/telldus-core: unbreak with clang 4.0

  service/SettingsConfuse.cpp:47:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
          if (d->cfg > 0) {
              ~~~~~~ ^ ~
  service/SettingsConfuse.cpp:50:17: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
          if (d->var_cfg > 0) {
              ~~~~~~~~~~ ^ ~
  service/SettingsConfuse.cpp:61:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
          if (d->cfg > 0) {
              ~~~~~~ ^ ~
  service/SettingsConfuse.cpp:73:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
          if (d->cfg > 0) {
              ~~~~~~ ^ ~

  PR:		216052
  Submitted by:	Johan Str?m (maintainer)
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2017Q1/
  branches/2017Q1/comms/telldus-core/files/patch-service-SettingsConfuse.cpp
Comment 6 Johan Ström 2017-01-31 06:21:24 UTC
Removing myself from bug, telldus-core is fixed. Automated spam?