[asterisk-dev] [Code Review]: ast_channel opaquification: most pointers, integer types

opticron reviewboard at asterisk.org
Tue Feb 21 11:38:54 CST 2012



> On Feb. 21, 2012, 8:33 a.m., opticron wrote:
> > This introduces several issues building in dev mode.
> 
> Terry Wilson wrote:
>     I am assuming you are using an older compiler, because it compiles fine in dev mode for me. Could you be a little more specific about the issues you see?
> 
> opticron wrote:
>     I'm on gcc 4.6.3.  This is the first of them:
>     res_monitor.c: In function 'start_monitor_exec':
>     res_monitor.c:696:22: error: 'chan_cdr' may be used uninitialized in this function [-Werror=uninitialized]
>     
>     There are also issues that pop up in channel.c and elsewhere.
> 
> Terry Wilson wrote:
>     I'm using gcc 4.6.1 and it doesn't complain. The one you point out looks like a valid issue; if the channel cdr is already set, we would overwrite it with a unitialized value. I think moving the set into an else block would be the thing to do. But I can't fix them if I don't know where they are. Is gcc 4.6.3 the snapshot? I don't see a 4.6.3 release. Please create an issue with the compiler output and I'll see what I can do. I just can't fix what I can't see. :-)

Posted in ASTERISK-19419


- opticron


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


On Feb. 18, 2012, 1:45 p.m., Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1753/
> -----------------------------------------------------------
> 
> (Updated Feb. 18, 2012, 1:45 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This converts various int/long fields and most pointer fields. That leaves mostly structs, typedefs, a couple of int arrays and a couple of "problem fields". It might be a good idea for reviewers to apply the patch and compile just in case I missed something somewhere.
> 
> 
> Diffs
> -----
> 
>   /trunk/addons/chan_mobile.c 355898 
>   /trunk/addons/chan_ooh323.c 355898 
>   /trunk/apps/app_alarmreceiver.c 355898 
>   /trunk/apps/app_authenticate.c 355898 
>   /trunk/apps/app_cdr.c 355898 
>   /trunk/apps/app_chanisavail.c 355898 
>   /trunk/apps/app_channelredirect.c 355898 
>   /trunk/apps/app_chanspy.c 355898 
>   /trunk/apps/app_confbridge.c 355898 
>   /trunk/apps/app_dahdibarge.c 355898 
>   /trunk/apps/app_dahdiras.c 355898 
>   /trunk/apps/app_dial.c 355898 
>   /trunk/apps/app_dictate.c 355898 
>   /trunk/apps/app_directory.c 355898 
>   /trunk/apps/app_disa.c 355898 
>   /trunk/apps/app_dumpchan.c 355898 
>   /trunk/apps/app_echo.c 355898 
>   /trunk/apps/app_externalivr.c 355898 
>   /trunk/apps/app_fax.c 355898 
>   /trunk/apps/app_festival.c 355898 
>   /trunk/apps/app_flash.c 355898 
>   /trunk/apps/app_followme.c 355898 
>   /trunk/apps/app_forkcdr.c 355898 
>   /trunk/apps/app_ices.c 355898 
>   /trunk/apps/app_ivrdemo.c 355898 
>   /trunk/apps/app_macro.c 355898 
>   /trunk/apps/app_meetme.c 355898 
>   /trunk/apps/app_milliwatt.c 355898 
>   /trunk/apps/app_minivm.c 355898 
>   /trunk/apps/app_osplookup.c 355898 
>   /trunk/apps/app_parkandannounce.c 355898 
>   /trunk/apps/app_playback.c 355898 
>   /trunk/apps/app_playtones.c 355898 
>   /trunk/apps/app_privacy.c 355898 
>   /trunk/apps/app_queue.c 355898 
>   /trunk/apps/app_read.c 355898 
>   /trunk/apps/app_readexten.c 355898 
>   /trunk/apps/app_record.c 355898 
>   /trunk/apps/app_rpt.c 355898 
>   /trunk/apps/app_sayunixtime.c 355898 
>   /trunk/apps/app_sendtext.c 355898 
>   /trunk/apps/app_sms.c 355898 
>   /trunk/apps/app_softhangup.c 355898 
>   /trunk/apps/app_speech_utils.c 355898 
>   /trunk/apps/app_stack.c 355898 
>   /trunk/apps/app_talkdetect.c 355898 
>   /trunk/apps/app_test.c 355898 
>   /trunk/apps/app_transfer.c 355898 
>   /trunk/apps/app_verbose.c 355898 
>   /trunk/apps/app_voicemail.c 355898 
>   /trunk/apps/app_waitforsilence.c 355898 
>   /trunk/apps/app_while.c 355898 
>   /trunk/apps/app_zapateller.c 355898 
>   /trunk/bridges/bridge_builtin_features.c 355898 
>   /trunk/bridges/bridge_multiplexed.c 355898 
>   /trunk/bridges/bridge_simple.c 355898 
>   /trunk/cdr/cdr_custom.c 355898 
>   /trunk/cdr/cdr_manager.c 355898 
>   /trunk/cdr/cdr_sqlite3_custom.c 355898 
>   /trunk/cdr/cdr_syslog.c 355898 
>   /trunk/channels/chan_agent.c 355898 
>   /trunk/channels/chan_alsa.c 355898 
>   /trunk/channels/chan_bridge.c 355898 
>   /trunk/channels/chan_console.c 355898 
>   /trunk/channels/chan_dahdi.c 355898 
>   /trunk/channels/chan_gtalk.c 355898 
>   /trunk/channels/chan_h323.c 355898 
>   /trunk/channels/chan_iax2.c 355898 
>   /trunk/channels/chan_jingle.c 355898 
>   /trunk/channels/chan_local.c 355898 
>   /trunk/channels/chan_mgcp.c 355898 
>   /trunk/channels/chan_misdn.c 355898 
>   /trunk/channels/chan_multicast_rtp.c 355898 
>   /trunk/channels/chan_nbs.c 355898 
>   /trunk/channels/chan_oss.c 355898 
>   /trunk/channels/chan_phone.c 355898 
>   /trunk/channels/chan_sip.c 355898 
>   /trunk/channels/chan_skinny.c 355898 
>   /trunk/channels/chan_unistim.c 355898 
>   /trunk/channels/chan_usbradio.c 355898 
>   /trunk/channels/chan_vpb.cc 355898 
>   /trunk/channels/sig_analog.c 355898 
>   /trunk/channels/sig_pri.c 355898 
>   /trunk/channels/sig_ss7.c 355898 
>   /trunk/channels/sip/dialplan_functions.c 355898 
>   /trunk/funcs/func_callerid.c 355898 
>   /trunk/funcs/func_cdr.c 355898 
>   /trunk/funcs/func_channel.c 355898 
>   /trunk/funcs/func_jitterbuffer.c 355898 
>   /trunk/funcs/func_timeout.c 355898 
>   /trunk/include/asterisk/channel.h 355898 
>   /trunk/include/asterisk/sched.h 355898 
>   /trunk/main/abstract_jb.c 355898 
>   /trunk/main/app.c 355898 
>   /trunk/main/audiohook.c 355898 
>   /trunk/main/bridging.c 355898 
>   /trunk/main/ccss.c 355898 
>   /trunk/main/cdr.c 355898 
>   /trunk/main/cel.c 355898 
>   /trunk/main/channel.c 355898 
>   /trunk/main/channel_internal_api.c 355898 
>   /trunk/main/cli.c 355898 
>   /trunk/main/devicestate.c 355898 
>   /trunk/main/dial.c 355898 
>   /trunk/main/features.c 355898 
>   /trunk/main/file.c 355898 
>   /trunk/main/framehook.c 355898 
>   /trunk/main/image.c 355898 
>   /trunk/main/manager.c 355898 
>   /trunk/main/message.c 355898 
>   /trunk/main/pbx.c 355898 
>   /trunk/main/rtp_engine.c 355898 
>   /trunk/main/udptl.c 355898 
>   /trunk/pbx/pbx_lua.c 355898 
>   /trunk/pbx/pbx_realtime.c 355898 
>   /trunk/res/res_adsi.c 355898 
>   /trunk/res/res_agi.c 355898 
>   /trunk/res/res_calendar.c 355898 
>   /trunk/res/res_fax.c 355898 
>   /trunk/res/res_monitor.c 355898 
>   /trunk/res/res_musiconhold.c 355898 
>   /trunk/res/res_rtp_asterisk.c 355898 
>   /trunk/res/snmp/agent.c 355898 
> 
> Diff: https://reviewboard.asterisk.org/r/1753/diff
> 
> 
> Testing
> -------
> 
> All unit tests pass. I got the same number of testsuite failures as a clean checkout of trunk.
> 
> 
> Thanks,
> 
> Terry
> 
>

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


More information about the asterisk-dev mailing list