[asterisk-dev] [Code Review] avoid cppcheck warnings
Tilghman Lesher
reviewboard at asterisk.org
Mon Jan 9 11:53:30 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1651/#review5137
-----------------------------------------------------------
trunk/addons/chan_mobile.c
<https://reviewboard.asterisk.org/r/1651/#comment9563>
This still needs to be checking the return value which can be 0 or -1, and if -1, checking errno. I know you didn't write the code, but removing the error stub isn't the right answer, either.
trunk/addons/chan_ooh323.c
<https://reviewboard.asterisk.org/r/1651/#comment9564>
As noted by putnopvut previously, now that we're not retrieving a value, this line is a no-op. I suspect that this points to another problem that should be fixed, and thus removing the stub isn't really a code improvement.
trunk/apps/app_chanspy.c
<https://reviewboard.asterisk.org/r/1651/#comment9565>
Add braces while you're here.
trunk/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1651/#comment9566>
This is another indication that the return value should be checked. Instead of removing that indication, check it.
trunk/apps/app_voicemail.c
<https://reviewboard.asterisk.org/r/1651/#comment9568>
Kill red blob
trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/1651/#comment9569>
flose()? What does flose() do?
trunk/main/ast_expr2f.c
<https://reviewboard.asterisk.org/r/1651/#comment9570>
Kill the red blobs.
- Tilghman
On Jan. 8, 2012, 9:07 p.m., junky wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1651/
> -----------------------------------------------------------
>
> (Updated Jan. 8, 2012, 9:07 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/addons/chan_mobile.c 349670
> trunk/addons/chan_ooh323.c 349670
> trunk/apps/app_alarmreceiver.c 349670
> trunk/apps/app_chanspy.c 349670
> trunk/apps/app_disa.c 349670
> trunk/apps/app_minivm.c 349670
> trunk/apps/app_osplookup.c 349670
> trunk/apps/app_queue.c 349670
> trunk/apps/app_voicemail.c 349670
> trunk/channels/chan_dahdi.c 349670
> trunk/channels/chan_iax2.c 349670
> trunk/channels/chan_misdn.c 349670
> trunk/channels/chan_skinny.c 349670
> trunk/channels/chan_usbradio.c 349670
> trunk/formats/format_h263.c 349670
> trunk/funcs/func_env.c 349670
> trunk/funcs/func_odbc.c 349670
> trunk/funcs/func_strings.c 349670
> trunk/main/acl.c 349670
> trunk/main/ast_expr2.c 349670
> trunk/main/ast_expr2f.c 349670
> trunk/main/pbx.c 349670
> trunk/main/udptl.c 349670
> trunk/res/res_phoneprov.c 349670
> trunk/utils/astman.c 349670
>
> 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/20120109/14451a25/attachment-0001.htm>
More information about the asterisk-dev
mailing list