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

Diederik de Groot reviewboard at asterisk.org
Sat Mar 28 10:27:55 CDT 2015


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

(Updated March 28, 2015, 4:27 p.m.)


Review request for Asterisk Developers.


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


Repository: Asterisk


Description (updated)
-------

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/20150328/8b9e6afd/attachment-0001.html>


More information about the asterisk-dev mailing list