[asterisk-dev] [Code Review] 4555: clang compiler warning: fixes for tests to be compiled using clang

Diederik de Groot reviewboard at asterisk.org
Sun Mar 29 12:29:27 CDT 2015


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



/branches/13/tests/test_acl.c
<https://reviewboard.asterisk.org/r/4555/#comment25579>

    clang can't handle gcc's nested function extension. I could have opted to build a clang ^block instead, but i choose the simple external function instead.



/branches/13/tests/test_strings.c
<https://reviewboard.asterisk.org/r/4555/#comment25578>

    The clang compiler blows up/crashes when running ast_alloca(0) (ie:__builtin_alloca(0))
    
    possible solutions:
    - report issue to clang / llvm
    - add check to ast_alloca and enforce return value on error
    - or make sure we don't call ast_alloca with a size of 0 ever.


- Diederik de Groot


On March 29, 2015, 7:26 p.m., Diederik de Groot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4555/
> -----------------------------------------------------------
> 
> (Updated March 29, 2015, 7:26 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> 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. 
> 
> fixes for tests to be compiled using clang
> 
> 
> Diffs
> -----
> 
>   /branches/13/tests/test_strings.c 433444 
>   /branches/13/tests/test_stringfields.c 433444 
>   /branches/13/tests/test_sched.c 433444 
>   /branches/13/tests/test_linkedlists.c 433444 
>   /branches/13/tests/test_acl.c 433444 
> 
> Diff: https://reviewboard.asterisk.org/r/4555/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Diederik de Groot
> 
>

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


More information about the asterisk-dev mailing list