Bug 216199

Summary: comms/fldigi: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: hamradio (Nobody) <hamradio>
Status: Closed FIXED    
Severity: Affects Only Me CC: db, w.schwarzenfeld
Priority: --- Keywords: needs-patch
Version: LatestFlags: bugzilla: maintainer-feedback? (hamradio)
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=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=216019
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=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
possible-patch none

Description Jan Beich freebsd_committer 2017-01-17 23:04:26 UTC
logbook/adif_io.cxx:314:15: error: ordered comparison between pointer and zero ('char *' and 'int')
                        if ((ptr2) > 0 && (unsigned)(ptr2 - ptr) <= p)
                            ~~~~~~ ^ ~

build log: http://sprunge.us/VTEb
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Walter Schwarzenfeld freebsd_triage 2017-03-07 10:23:45 UTC
Created attachment 180595 [details]
possible-patch

I am uncertain about the lookupcall.c-patch, but 
      (aka 'char') changes value from 184 to -72 [-Wconstant-conversion]
        if ((p = htmlpage.find(HAMCALL_FIRST)) != string::npos) {
                          ~~~~ ^~~~~~~~~~~~~
logbook/lookupcall.cxx:715:23: note: expanded from macro 'HAMCALL_FIRST'
#define HAMCALL_FIRST 184
--
      (aka 'char') changes value from 191 to -65 [-Wconstant-conversion]
        if ((p = htmlpage.find(HAMCALL_CITY)) != string::npos) {
                          ~~~~ ^~~~~~~~~~~~
logbook/lookupcall.cxx:716:22: note: expanded from macro 'HAMCALL_CITY'
#define HAMCALL_CITY 191
--
      (aka 'char') changes value from 192 to -64 [-Wconstant-conversion]
        if ((p = htmlpage.find(HAMCALL_STATE)) != string::npos) {
                          ~~~~ ^~~~~~~~~~~~~
logbook/lookupcall.cxx:717:23: note: expanded from macro 'HAMCALL_STATE'
#define HAMCALL_STATE 192
--
      (aka 'char') changes value from 202 to -54 [-Wconstant-conversion]
        if ((p = htmlpage.find(HAMCALL_GRID)) != string::npos) {
                          ~~~~ ^~~~~~~~~~~~
logbook/lookupcall.cxx:718:22: note: expanded from macro 'HAMCALL_GRID'


seems not to be right.
Comment 2 Walter Schwarzenfeld freebsd_triage 2017-03-27 11:11:00 UTC
Could closed. The maintainer has updated the port:
https://svnweb.freebsd.org/ports?view=revision&revision=436980

Don't know why it is not noticed here.
Comment 3 Walter Schwarzenfeld freebsd_triage 2017-03-27 11:11:55 UTC
Forgot:
And solved the error.
Comment 4 Diane Bruce freebsd_committer 2017-03-27 12:28:45 UTC
Since upstream is currently in alpha testing it made more sense to do an interim quick patch and not introduce tons of extra patches into our own port.