[asterisk-bugs] [JIRA] (ASTERISK-27559) [patch] editline: Avoid comparison between pointer and zero character constant.

Asterisk Team (JIRA) noreply at issues.asterisk.org
Wed Aug 8 10:14:59 CDT 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-27559:
-------------------------------------

    Target Release Version/s: 16.0.0

> [patch] editline: Avoid comparison between pointer and zero character constant.
> -------------------------------------------------------------------------------
>
>                 Key: ASTERISK-27559
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27559
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 13.18.5, 15.1.5
>            Reporter: Alexander Traud
>            Assignee: Alexander Traud
>            Severity: Minor
>              Labels: patch
>      Target Release: 13.20.0, 15.3.0, 16.0.0
>
>         Attachments: gcc_editline.patch
>
>
> The compiler GCC (7.2) reports:{code}In file included from editline.c:18:0:
> term.c: In function 'term_alloc':
> term.c:431:28: warning: comparison between pointer and zero character constant [-Wpointer-compare]
>    if (*tmp != NULL && *tmp != '\0' && *tmp != *str) {
>                             ^~
> term.c:431:23: note: did you mean to dereference the pointer?{code}This is an external library, which is still maintained: http://thrysoee.dk/editline/
> That upstream project is active, the last change happened just four days ago (officially it is called libedit 2.11). The copy within Asterisk is from 2002, libedit 2.6.
> The short-term workaround is to use the precompiled libedit of your Unix distribution, for example in Debian/Ubuntu: {{sudo apt install libedit-dev}}. As mid-term solution, I attached/backported the change which resolves the compiler issue above ([original source|http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/terminal.c.diff?r1=1.22&r2=1.24]).
> Although that library has seen only 49 commits over the last 15 years in Asterisk, as long-term approach, that external library should be
> A) updated to the latest upstream version. Or
> B) removed and relied solely on precompiled Unix packages, see ASTERISK-18725.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list