[Home]

Summary:ASTERISK-27635: [patch] app_voicemail: Avoid always true warnings with clang.
Reporter:Alexander Traud (traud)Labels:patch
Date Opened:2018-01-29 09:36:30.000-0600Date Closed:2018-01-31 15:39:03.000-0600
Priority:TrivialRegression?
Status:Closed/CompleteComponents:Applications/app_voicemail/IMAP
Versions:13.19.0 15.2.0 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-24917 [patch] clang compilation warnings
Environment:clang 4.0 FreeBSD 11.1Attachments:( 0) clang_app_voicemail_with_imap.patch
Description:34 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 storage for the app _voicemail_ was changed from file to IMAP via {{make menuselect}}.

Then on FreeBSD 11.1, its default compiler _clang_ (4.0) reports:{code}warning: address of array 'vms->imapuser' will always evaluate to 'true' [-Wpointer-bool-conversion]
warning: address of array 'vms->username' will always evaluate to 'true' [-Wpointer-bool-conversion]
warning: address of array 'vms->context' will always evaluate to 'true' [-Wpointer-bool-conversion]{code}two times each, resulting in six warnings.
Comments:By: Friendly Automation (friendly-automation) 2018-01-31 15:39:04.697-0600

Change 8086 merged by Jenkins2:
app_voicemail: Avoid always true when using pointer address.

[https://gerrit.asterisk.org/8086|https://gerrit.asterisk.org/8086]

By: Friendly Automation (friendly-automation) 2018-01-31 15:44:22.478-0600

Change 8085 merged by Jenkins2:
app_voicemail: Avoid always true when using pointer address.

[https://gerrit.asterisk.org/8085|https://gerrit.asterisk.org/8085]

By: Friendly Automation (friendly-automation) 2018-01-31 15:47:00.056-0600

Change 8087 merged by Jenkins2:
app_voicemail: Avoid always true when using pointer address.

[https://gerrit.asterisk.org/8087|https://gerrit.asterisk.org/8087]