Summary: | comms/hylafax: Fails to build (post-Clang 6 import) -- error: comparison between pointer and integer | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | O. Hartmann <ohartmann> | ||||||
Component: | Individual Port(s) | Assignee: | Kubilay Kocak <koobs> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | dim, naddy, w.schwarzenfeld | ||||||
Priority: | --- | Flags: | koobs:
maintainer-feedback+
koobs: maintainer-feedback+ koobs: merge-quarterly+ |
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
O. Hartmann
2018-01-22 06:25:27 UTC
Created attachment 191117 [details]
patch-libhylafax_FaxRecvInfo.c++
The patch works for me. Is it going to be commited? The patch doesn't make sense. It restores the existing behavior but there must be a bug there. cp+2 will never be NULL (unless we wrap around the end of the address space). At first glance cp[2] != '\0' might have been intended, but I don't understand the overall logic. Dmitry (Clang 6 guru/maintainer) may be able to shed light on the correct course of action from a C++ code point of view. Created attachment 196063 [details]
Fix bad pointer comparison
Yeah, having looked at that routine, I'm of the opinion that it should be cp[2] != '\0'. Now I am going to rinse out my eyeballs with some soap, it is a miracle that this software works at all.
A commit references this bug: Author: koobs Date: Sun Oct 7 10:29:07 UTC 2018 New revision: 481438 URL: https://svnweb.freebsd.org/changeset/ports/481438 Log: comms/hylafax: Fix build with Clang 6 (and GCC7) Add patch from upstream HylaFAX+, fixing a Clang 6 (and GCC7) build error: FaxRecvInfo.c++:115:17: error: comparison between pointer and integer ('const char *' and 'int') while (cp+2 != '\0') { ~~~~ ^ ~~~~ [1] http://bugs.hylafax.org/show_bug.cgi?id=971 [2] https://sourceforge.net/p/hylafax/HylaFAX+/2417/ [3] See Also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853448 PR: 225372 Reported by: O. Hartmann <ohartmann walstatt org> Obtained from: HylaFAX+ [2] MFH: 2018Q4 Changes: head/comms/hylafax/Makefile head/comms/hylafax/files/patch-libhylafax_FaxRecvInfo.c++ A commit references this bug: Author: koobs Date: Mon Oct 8 08:53:59 UTC 2018 New revision: 481526 URL: https://svnweb.freebsd.org/changeset/ports/481526 Log: MFH: r481438 comms/hylafax: Fix build with Clang 6 (and GCC7) Add patch from upstream HylaFAX+, fixing a Clang 6 (and GCC7) build error: FaxRecvInfo.c++:115:17: error: comparison between pointer and integer ('const char *' and 'int') while (cp+2 != '\0') { ~~~~ ^ ~~~~ [1] http://bugs.hylafax.org/show_bug.cgi?id=971 [2] https://sourceforge.net/p/hylafax/HylaFAX+/2417/ [3] See Also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853448 PR: 225372 Reported by: O. Hartmann <ohartmann walstatt org> Obtained from: HylaFAX+ [2] Approved by: ports-secteam (miwi) Changes: _U branches/2018Q4/ branches/2018Q4/comms/hylafax/Makefile branches/2018Q4/comms/hylafax/files/patch-libhylafax_FaxRecvInfo.c++ Committed (using change obtained from upstream) and merged Thank you for your help everyone, apologies for the delay. |