[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:24:42 CDT 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4555/#review14957
-----------------------------------------------------------
/branches/13/tests/test_acl.c
<https://reviewboard.asterisk.org/r/4555/#comment25574>
Can't use the gcc nested function extension. Could have replaced it with a clang -block solution, but opted for the simple external function solution.
/branches/13/tests/test_strings.c
<https://reviewboard.asterisk.org/r/4555/#comment25575>
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.
/branches/13/tests/test_strings.c
<https://reviewboard.asterisk.org/r/4555/#comment25576>
Woops. Debugging remnant, should not have been here.
- Diederik de Groot
On March 29, 2015, 7:24 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:24 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/06190e3b/attachment-0001.html>
More information about the asterisk-dev
mailing list