[asterisk-dev] [Code Review] 4529: clang compiler warning: -Wno-sometimes-uninitialized
Matt Jordan
reviewboard at asterisk.org
Fri Mar 27 08:23:14 CDT 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4529/#review14894
-----------------------------------------------------------
/branches/13/pbx/pbx_config.c
<https://reviewboard.asterisk.org/r/4529/#comment25519>
Well, this won't quite work, as appdata can be NULL. strlen isn't NULL safe.
As such, you'll need to do something like:
int escaped_len = (!ast_strlen_zero(appdata) ? 2 * strlen(appdata) : 0) + 1;
- Matt Jordan
On March 27, 2015, 5:22 a.m., Diederik de Groot wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4529/
> -----------------------------------------------------------
>
> (Updated March 27, 2015, 5:22 a.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\nclang compiler warning:-Wno-sometimes-uninitialized
>
>
> Diffs
> -----
>
> /branches/13/pbx/pbx_config.c 433444
>
> Diff: https://reviewboard.asterisk.org/r/4529/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Diederik de Groot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150327/6d543692/attachment.html>
More information about the asterisk-dev
mailing list