[asterisk-dev] [Code Review]: avoid cppcheck warnings
junky
reviewboard at asterisk.org
Mon Jan 9 18:56:06 CST 2012
> On Jan. 9, 2012, 3:33 p.m., wdoekes wrote:
> > And a couple of other minor points. Thanks for cleaning things up.
no problem, thanks for adding your points too.
After this patch goes in, a version #2 will be available to prevent even more cppcheck.
> On Jan. 9, 2012, 3:33 p.m., wdoekes wrote:
> > trunk/apps/app_chanspy.c, line 617
> > <https://reviewboard.asterisk.org/r/1651/diff/3/?file=22910#file22910line617>
> >
> > You're never using this res value. Drop the assignment instead.
dropped.
> On Jan. 9, 2012, 3:33 p.m., wdoekes wrote:
> > trunk/apps/app_osplookup.c, lines 1455-1456
> > <https://reviewboard.asterisk.org/r/1651/diff/3/?file=22913#file22913line1455>
> >
> > Prefer "return OSP_ERROR" directly, the code below does so too.
you asked for it, you got it!
> On Jan. 9, 2012, 3:33 p.m., wdoekes wrote:
> > trunk/apps/app_osplookup.c, lines 1814-1815
> > <https://reviewboard.asterisk.org/r/1651/diff/3/?file=22913#file22913line1814>
> >
> > Prefer "return OSP_ERROR" directly, the code below does so too.
changed.
> On Jan. 9, 2012, 3:33 p.m., wdoekes wrote:
> > trunk/apps/app_osplookup.c, lines 1533-1534
> > <https://reviewboard.asterisk.org/r/1651/diff/3/?file=22913#file22913line1533>
> >
> > Prefer "return OSP_ERROR" directly, the code below does so too.
changed.
> On Jan. 9, 2012, 3:33 p.m., wdoekes wrote:
> > trunk/apps/app_osplookup.c, lines 1465-1469
> > <https://reviewboard.asterisk.org/r/1651/diff/3/?file=22913#file22913line1465>
> >
> > No-op alert.
huh? osp_lookup() is used.
> On Jan. 9, 2012, 3:33 p.m., wdoekes wrote:
> > trunk/apps/app_voicemail.c, line 3067
> > <https://reviewboard.asterisk.org/r/1651/diff/3/?file=22915#file22915line3067>
> >
> > '"'
changed.
> On Jan. 9, 2012, 3:33 p.m., wdoekes wrote:
> > trunk/channels/chan_iax2.c, line 3101
> > <https://reviewboard.asterisk.org/r/1651/diff/3/?file=22917#file22917line3101>
> >
> > You're not using res. Better remove the assignment instead.
removed.
- junky
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1651/#review5144
-----------------------------------------------------------
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/20120110/235585ee/attachment-0001.htm>
More information about the asterisk-dev
mailing list