[asterisk-bugs] [JIRA] (ASTERISK-27629) [patch] headers: Replace typeof with __typeof__.

Asterisk Team (JIRA) noreply at issues.asterisk.org
Sat Jan 27 02:55:49 CST 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=241836#comment-241836 ] 

Asterisk Team commented on ASTERISK-27629:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> [patch] headers: Replace typeof with __typeof__.
> ------------------------------------------------
>
>                 Key: ASTERISK-27629
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27629
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Portability
>    Affects Versions: 13.19.0, 15.2.0
>         Environment: FreeBSD 11.1 with clang 4.0
>            Reporter: Alexander Traud
>            Severity: Minor
>
> The documentation of GCC [states|http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords] one should not use {{typeof}} in header files. Instead, {{\_\_typeof\_\_}} should be used. In Asterisk, {{typeof}} is used 117 times in header files. If {{typeof}} is within a DEFINE and referenced only by C code, {{typeof}} is not really used in a header file because it is eliminated by the preprocessor already. Of these 117, only 4 occasions were identified to be used within a header file itself. 3 were directly used and were found by a text search. 1 occasion (utils.h) is a DEFINE which is then used within the function {{ast_alertpipe_swap(.)}}, which is coded in a header file.
> These issues were found by compiling {{res_snmp.c}} within FreeBSD 11.1 with its default compiler _clang_ 4.0. Although the root cause is quite obvious, uncertainty remains why these errors happened only with the module {{res_snmp.c}}. These headers are included by other modules before. Therefore, something else in the build system must be wrong, because this got obvious only when trying to compile {{res_snmp.c}} and did not happen with clang 4.0 (and clang 5.0) on Debian, Ubuntu, CentOS, or Fedora.
> Workaround: Disable res_snmp via {{menuselect}} or to  remove the package {{net-snmp}} from the installation, for example via {{pkg delete net-snmp}}.



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



More information about the asterisk-bugs mailing list