[asterisk-dev] [Code Review] avoid cppcheck warnings

Tilghman Lesher reviewboard at asterisk.org
Wed Jan 25 11:35:29 CST 2012


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



trunk/addons/chan_mobile.c
<https://reviewboard.asterisk.org/r/1651/#comment9832>

    Add braces ({}) while you're here.



trunk/main/ast_expr2f.c
<https://reviewboard.asterisk.org/r/1651/#comment9833>

    It especially worries me that you are editing a generated file without also editing the source file.  These lines are 100% generated -- meaning, when you regenerate the file with flex, they will reappear.
    
    That goes for this entire file -- if you want to modify anything here, you need to edit main/ast_expr2.fl, then regenerate the file with the REBUILD_PARSERS option turned on.


- Tilghman


On Jan. 24, 2012, 8:35 p.m., junky wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1651/
> -----------------------------------------------------------
> 
> (Updated Jan. 24, 2012, 8:35 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> By running cppcheck 1.52, i realized there was many errors/warnings.
> 
> This patch fixes many of those.
> 
> 
> Diffs
> -----
> 
>   trunk/Makefile 351181 
>   trunk/addons/chan_mobile.c 351181 
>   trunk/addons/chan_ooh323.c 351181 
>   trunk/apps/app_alarmreceiver.c 351181 
>   trunk/apps/app_chanspy.c 351181 
>   trunk/apps/app_dial.c 351181 
>   trunk/apps/app_disa.c 351181 
>   trunk/apps/app_minivm.c 351181 
>   trunk/apps/app_osplookup.c 351181 
>   trunk/apps/app_queue.c 351181 
>   trunk/apps/app_voicemail.c 351181 
>   trunk/channels/chan_dahdi.c 351181 
>   trunk/channels/chan_iax2.c 351181 
>   trunk/channels/chan_misdn.c 351181 
>   trunk/channels/chan_skinny.c 351181 
>   trunk/channels/chan_usbradio.c 351181 
>   trunk/formats/format_h263.c 351181 
>   trunk/funcs/func_env.c 351181 
>   trunk/funcs/func_odbc.c 351181 
>   trunk/funcs/func_strings.c 351181 
>   trunk/main/acl.c 351181 
>   trunk/main/ast_expr2.c 351181 
>   trunk/main/ast_expr2f.c 351181 
>   trunk/main/pbx.c 351181 
>   trunk/main/udptl.c 351181 
>   trunk/res/res_phoneprov.c 351181 
>   trunk/utils/astman.c 351181 
> 
> Diff: https://reviewboard.asterisk.org/r/1651/diff
> 
> 
> Testing
> -------
> 
> still compile fine.
> Shouldn't have any impact on the code execution.
> 
> 
> Thanks,
> 
> junky
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120125/6ee28ba0/attachment-0001.htm>


More information about the asterisk-dev mailing list