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

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Dec 2 12:46:37 CST 2021


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

Asterisk Team updated ASTERISK-29710:
-------------------------------------

    Target Release Version/s: 16.23.0

> 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
>            Assignee: Alexander Traud
>              Labels: patch
>      Target Release: 16.23.0
>
>         Attachments: clang_stasis.patch
>
>
> 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