[asterisk-bugs] [JIRA] (ASTERISK-29710) stasis: Clang 13 warns about the unused but set variable dispatched.
Benjamin Keith Ford (JIRA)
noreply at issues.asterisk.org
Thu Oct 28 08:08:50 CDT 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Keith Ford updated ASTERISK-29710:
-------------------------------------------
Status: Open (was: Triage)
> 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
> Labels: patch
> 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