[asterisk-bugs] [JIRA] (ASTERISK-28808) [patch] test_stasis: Avoid always true warning with clang.

Alexander Traud (JIRA) noreply at issues.asterisk.org
Mon Apr 6 06:56:25 CDT 2020


Alexander Traud created ASTERISK-28808:
------------------------------------------

             Summary: [patch] test_stasis: Avoid always true warning with clang.
                 Key: ASTERISK-28808
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28808
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Tests/General
    Affects Versions: 17.3.0, 16.9.0, 13.32.0
         Environment: clang
            Reporter: Alexander Traud
            Severity: Trivial


60 months ago, [review 4541|https://reviewboard.asterisk.org/r/4541/] (ASTERISK-24917) resolved warnings raised by the compiler clang. However, because alternative/conflicting code paths exist, some warnings got missed. Here in this case, the developer mode was activated via {{./configure --enable-dev-mode}} and the test framework was enabled via {{make menuselect}}.

Then, clang reports:{code}test_stasis.c:2205:18: error: address of array 'data->description' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                        data && data->description ? data->description : "no data");
                             ~~ ~~~~~~^~~~~~~~~~~{code}



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



More information about the asterisk-bugs mailing list