[asterisk-dev] [Code Review] Const-ify the world (or at least a good part of it)

Russell Bryant russell at digium.com
Mon May 18 13:57:14 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/251/#review785
-----------------------------------------------------------



trunk/apps/app_authenticate.c
<http://reviewboard.digium.com/r/251/#comment1967>

    If we're changing this anyway, is there a reason we don't make it "const char *" instead of "const void *" ?


- Russell


On 2009-05-14 17:00:19, Kevin Fleming wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/251/
> -----------------------------------------------------------
> 
> (Updated 2009-05-14 17:00:19)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:
> 
> - CLI command handlers
> - CLI command handler arguments
> - AGI command handlers
> - AGI command handler arguments
> - Dialplan application handler arguments
> - Speech engine API function arguments
> 
> In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.
> 
> 
> Diffs
> -----
> 
>   trunk/main/abstract_jb.c 194476 
>   trunk/include/asterisk/taskprocessor.h 194476 
>   trunk/include/asterisk/utils.h 194476 
>   trunk/include/asterisk/strings.h 194476 
>   trunk/include/asterisk/speech.h 194476 
>   trunk/include/asterisk/pbx.h 194476 
>   trunk/include/asterisk/image.h 194476 
>   trunk/include/asterisk/module.h 194476 
>   trunk/include/asterisk/features.h 194476 
>   trunk/include/asterisk/extconf.h 194476 
>   trunk/include/asterisk/app.h 194476 
>   trunk/include/asterisk/cli.h 194476 
>   trunk/include/asterisk/agi.h 194476 
>   trunk/funcs/func_strings.c 194476 
>   trunk/include/asterisk/abstract_jb.h 194476 
>   trunk/funcs/func_odbc.c 194476 
>   trunk/channels/chan_skinny.c 194476 
>   trunk/channels/chan_unistim.c 194476 
>   trunk/channels/console_gui.c 194476 
>   trunk/channels/iax2-parser.c 194476 
>   trunk/channels/misdn/chan_misdn_config.h 194476 
>   trunk/channels/misdn_config.c 194476 
>   trunk/channels/vcodecs.c 194476 
>   trunk/formats/format_gsm.c 194476 
>   trunk/funcs/func_devstate.c 194476 
>   trunk/channels/chan_nbs.c 194476 
>   trunk/channels/chan_oss.c 194476 
>   trunk/channels/chan_sip.c 194476 
>   trunk/channels/chan_alsa.c 194476 
>   trunk/channels/chan_console.c 194476 
>   trunk/channels/chan_dahdi.c 194476 
>   trunk/channels/chan_iax2.c 194476 
>   trunk/channels/chan_mgcp.c 194476 
>   trunk/channels/chan_misdn.c 194476 
>   trunk/apps/app_sendtext.c 194476 
>   trunk/apps/app_setcallerid.c 194476 
>   trunk/apps/app_skel.c 194476 
>   trunk/apps/app_sms.c 194476 
>   trunk/apps/app_softhangup.c 194476 
>   trunk/apps/app_speech_utils.c 194476 
>   trunk/apps/app_stack.c 194476 
>   trunk/apps/app_system.c 194476 
>   trunk/apps/app_talkdetect.c 194476 
>   trunk/apps/app_test.c 194476 
>   trunk/apps/app_transfer.c 194476 
>   trunk/apps/app_url.c 194476 
>   trunk/apps/app_userevent.c 194476 
>   trunk/apps/app_verbose.c 194476 
>   trunk/apps/app_voicemail.c 194476 
>   trunk/apps/app_waitforring.c 194476 
>   trunk/apps/app_waitforsilence.c 194476 
>   trunk/apps/app_waituntil.c 194476 
>   trunk/apps/app_while.c 194476 
>   trunk/apps/app_zapateller.c 194476 
>   trunk/cdr/cdr_adaptive_odbc.c 194476 
>   trunk/cdr/cdr_sqlite.c 194476 
>   trunk/cdr/cdr_sqlite3_custom.c 194476 
>   trunk/channels/chan_agent.c 194476 
>   trunk/apps/app_playtones.c 194476 
>   trunk/apps/app_privacy.c 194476 
>   trunk/apps/app_queue.c 194476 
>   trunk/apps/app_read.c 194476 
>   trunk/apps/app_readexten.c 194476 
>   trunk/apps/app_readfile.c 194476 
>   trunk/apps/app_record.c 194476 
>   trunk/apps/app_rpt.c 194476 
>   trunk/apps/app_sayunixtime.c 194476 
>   trunk/apps/app_senddtmf.c 194476 
>   trunk/apps/app_minivm.c 194476 
>   trunk/apps/app_mixmonitor.c 194476 
>   trunk/apps/app_morsecode.c 194476 
>   trunk/apps/app_mp3.c 194476 
>   trunk/apps/app_nbscat.c 194476 
>   trunk/apps/app_originate.c 194476 
>   trunk/apps/app_osplookup.c 194476 
>   trunk/apps/app_page.c 194476 
>   trunk/apps/app_parkandannounce.c 194476 
>   trunk/apps/app_playback.c 194476 
>   trunk/apps/app_ivrdemo.c 194476 
>   trunk/apps/app_jack.c 194476 
>   trunk/apps/app_macro.c 194476 
>   trunk/apps/app_meetme.c 194476 
>   trunk/apps/app_milliwatt.c 194476 
>   trunk/apps/app_authenticate.c 194476 
>   trunk/apps/app_cdr.c 194476 
>   trunk/apps/app_chanisavail.c 194476 
>   trunk/apps/app_channelredirect.c 194476 
>   trunk/apps/app_chanspy.c 194476 
>   trunk/apps/app_confbridge.c 194476 
>   trunk/apps/app_controlplayback.c 194476 
>   trunk/apps/app_dahdibarge.c 194476 
>   trunk/apps/app_dahdiras.c 194476 
>   trunk/apps/app_db.c 194476 
>   trunk/apps/app_dial.c 194476 
>   trunk/apps/app_dictate.c 194476 
>   trunk/apps/app_directed_pickup.c 194476 
>   trunk/apps/app_directory.c 194476 
>   trunk/apps/app_disa.c 194476 
>   trunk/apps/app_dumpchan.c 194476 
>   trunk/apps/app_echo.c 194476 
>   trunk/apps/app_exec.c 194476 
>   trunk/apps/app_externalivr.c 194476 
>   trunk/apps/app_fax.c 194476 
>   trunk/apps/app_festival.c 194476 
>   trunk/apps/app_flash.c 194476 
>   trunk/apps/app_followme.c 194476 
>   trunk/apps/app_forkcdr.c 194476 
>   trunk/apps/app_getcpeid.c 194476 
>   trunk/apps/app_ices.c 194476 
>   trunk/apps/app_image.c 194476 
>   trunk/apps/app_alarmreceiver.c 194476 
>   trunk/apps/app_amd.c 194476 
>   trunk/apps/app_adsiprog.c 194476 
>   trunk/main/app.c 194476 
>   trunk/main/ast_expr2.fl 194476 
>   trunk/main/asterisk.c 194476 
>   trunk/main/astobj2.c 194476 
>   trunk/main/cdr.c 194476 
>   trunk/main/channel.c 194476 
>   trunk/main/cli.c 194476 
>   trunk/main/dsp.c 194476 
>   trunk/main/features.c 194476 
>   trunk/main/frame.c 194476 
>   trunk/main/image.c 194476 
>   trunk/main/loader.c 194476 
>   trunk/main/logger.c 194476 
>   trunk/main/manager.c 194476 
>   trunk/main/pbx.c 194476 
>   trunk/main/taskprocessor.c 194476 
>   trunk/main/udptl.c 194476 
>   trunk/main/ulaw.c 194476 
>   trunk/main/utils.c 194476 
>   trunk/pbx/dundi-parser.c 194476 
>   trunk/pbx/pbx_ael.c 194476 
>   trunk/pbx/pbx_config.c 194476 
>   trunk/res/res_agi.c 194476 
>   trunk/res/res_clioriginate.c 194476 
>   trunk/res/res_jabber.c 194476 
>   trunk/res/res_limit.c 194476 
>   trunk/res/res_monitor.c 194476 
>   trunk/res/res_musiconhold.c 194476 
>   trunk/res/res_odbc.c 194476 
>   trunk/res/res_rtp_asterisk.c 194476 
>   trunk/res/res_speech.c 194476 
>   trunk/utils/conf2ael.c 194476 
>   trunk/utils/extconf.c 194476 
> 
> Diff: http://reviewboard.digium.com/r/251/diff
> 
> 
> Testing
> -------
> 
> Compiles and Asterisk starts up with all modules loaded that I can load (which is nearly all of them).
> 
> 
> Thanks,
> 
> Kevin
> 
>




More information about the asterisk-dev mailing list