[asterisk-dev] [Code Review] 4540: clang compiler warning: -Wformat

Diederik de Groot reviewboard at asterisk.org
Mon Apr 6 12:52:20 CDT 2015


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

(Updated April 6, 2015, 12:52 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 434087


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


Issue:
framehook.c:141:16: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
                        i->version, AST_FRAMEHOOK_INTERFACE_VERSION);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/development/asterisk/asterisk-13-branch/include/asterisk/framehook.h:227:41: note: expanded from macro 'AST_FRAMEHOOK_INTERFACE_VERSION'
#define AST_FRAMEHOOK_INTERFACE_VERSION 4

Changed format: to use %i instead of %hu


Diffs
-----

  /branches/13/main/framehook.c 433444 

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


Testing
-------


Thanks,

Diederik de Groot

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


More information about the asterisk-dev mailing list