[asterisk-bugs] [JIRA] (ASTERISK-25627) Easily Preventable Compile Warning

Rusty Newton (JIRA) noreply at issues.asterisk.org
Mon Dec 28 09:43:32 CST 2015


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

Rusty Newton updated ASTERISK-25627:
------------------------------------

    Reference Notes:   (was: GCC-5
In file included from /usr/local/include/asterisk/poll-compat.h:82:0,
                 from /usr/local/include/asterisk/channel.h:128,
                 from /usr/local/include/asterisk/pbx.h:26,
/usr/local/include/asterisk/select.h: In function 'ast_select':
/usr/local/include/asterisk/select.h:88:18: warning: declaration of 'tv' shadows a global declaration [-Wshadow]
   struct timeval tv, tvstart, tvend, tvlen;
                  ^
In file included from /usr/local/include/asterisk/utils.h:33:0,
/usr/local/include/asterisk/time.h:35:23: note: shadowed declaration is here
 extern struct timeval tv;
                       ^)

> Easily Preventable Compile Warning
> ----------------------------------
>
>                 Key: ASTERISK-25627
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25627
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Core/General
>    Affects Versions: 1.8.32.3, 11.20.0, 13.6.0
>         Environment: BSD / Non-linux / gcc-5 / -Wshadow
>            Reporter: Diederik de Groot
>            Severity: Trivial
>
> {noformat}
> GCC-5
> In file included from /usr/local/include/asterisk/poll-compat.h:82:0,
>                  from /usr/local/include/asterisk/channel.h:128,
>                  from /usr/local/include/asterisk/pbx.h:26,
> /usr/local/include/asterisk/select.h: In function 'ast_select':
> /usr/local/include/asterisk/select.h:88:18: warning: declaration of 'tv' shadows a global declaration [-Wshadow]
>    struct timeval tv, tvstart, tvend, tvlen;
>                   ^
> In file included from /usr/local/include/asterisk/utils.h:33:0,
> /usr/local/include/asterisk/time.h:35:23: note: shadowed declaration is here
>  extern struct timeval tv;
>                        ^
> {noformat}
> Re-use of 'tv' variable name in poll-compat.h:82, also declared globally in time.h:35



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



More information about the asterisk-bugs mailing list