[asterisk-dev] [Code Review] 4535: clang compiler warning: -Wenum-conversion

Diederik de Groot reviewboard at asterisk.org
Sun Mar 29 21:39:38 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4535/
-----------------------------------------------------------

(Updated March 29, 2015, 9:39 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 433747


Bugs: ASTERISK-24917
    https://issues.asterisk.org/jira/browse/ASTERISK-24917


Repository: Asterisk


Description
-------

clang's static analyzer will throw quite a number warnings / errors during compilation, some of which can be very helpfull in finding corner-case bugs

clang compiler warning:-Wenum-conversion

Changes:
/branches/13/channels/chan_pjsip.c:923
Wrong enum being used

/branches/13/channels/chan_sip.c:19102
Incorrect enum

/branches/13/channels/chan_sip.c:19107
Incorrect enum returned

/branches/13/include/asterisk/strings.h:1236
Replaced enum ao2_container_opts opts -> enum ao2_alloc_opts opts
Not 100% sure if this substition is correct. Please verify.

/branches/13/main/strings.c:173
Replaced enum ao2_container_opts opts -> enum ao2_alloc_opts opts
Not 100% sure if this substition is correct. Please verify.

/branches/13/res/res_stasis.c:1803 
Incorrect enum for return value


Diffs
-----

  /branches/13/res/res_stasis.c 433444 
  /branches/13/main/strings.c 433444 
  /branches/13/include/asterisk/strings.h 433444 
  /branches/13/channels/chan_sip.c 433444 
  /branches/13/channels/chan_pjsip.c 433444 

Diff: https://reviewboard.asterisk.org/r/4535/diff/


Testing
-------


Thanks,

Diederik de Groot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150330/a638ad13/attachment.html>


More information about the asterisk-dev mailing list