[asterisk-bugs] [JIRA] (ASTERISK-29710) stasis: Clang 13 warns about the unused but set variable dispatched.

Alexander Traud (JIRA) noreply at issues.asterisk.org
Thu Oct 28 07:36:49 CDT 2021


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

Alexander Traud updated ASTERISK-29710:
---------------------------------------

    Description: 
This issue was caused by ASTERISK-28117.
{code}
   [CC] stasis.c -> stasis.o
stasis.c:1436:15: warning: variable 'dispatched' set but not used [-Wunused-but-set-variable]
        unsigned int dispatched = 0;
                     ^
{code}The integer variable {{dispatched}} is used only in developer mode. However, it is increased by code which runs in normal mode. Therefore, {{dispatched}} was falsely declared always and not only in developer mode. The attached patch fixes that.

  was:This issue was caused by ASTERISK-28117. The integer variable {{dispatched}} is used only in developer mode. However, it is increased by code which runs in normal mode. Therefore, {{dispatched}} was falsely declared always and not only in developer mode. The attached patch fixes that.


> stasis: Clang 13 warns about the unused but set variable dispatched.
> --------------------------------------------------------------------
>
>                 Key: ASTERISK-29710
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29710
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Stasis
>    Affects Versions: 16.21.1, 18.7.1
>            Reporter: Alexander Traud
>
> This issue was caused by ASTERISK-28117.
> {code}
>    [CC] stasis.c -> stasis.o
> stasis.c:1436:15: warning: variable 'dispatched' set but not used [-Wunused-but-set-variable]
>         unsigned int dispatched = 0;
>                      ^
> {code}The integer variable {{dispatched}} is used only in developer mode. However, it is increased by code which runs in normal mode. Therefore, {{dispatched}} was falsely declared always and not only in developer mode. The attached patch fixes that.



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



More information about the asterisk-bugs mailing list