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

Friendly Automation (JIRA) noreply at issues.asterisk.org
Mon Nov 1 10:36:49 CDT 2021


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

Friendly Automation commented on ASTERISK-29710:
------------------------------------------------

Change 16653 merged by Friendly Automation:
stasis: Avoid 'dispatched' as unused variable in normal mode.

[https://gerrit.asterisk.org/c/asterisk/+/16653|https://gerrit.asterisk.org/c/asterisk/+/16653]

> 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
>         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