[Freeswitch-dev] error in mod_spandsp_modem.c

Anthony Minessale anthony.minessale at gmail.com
Wed May 9 06:31:28 MSD 2012


fixed but you should have reported it to http://jira.freeswitch.org



On Tue, May 8, 2012 at 9:20 PM, Ken Rice <krice at freeswitch.org> wrote:
> What platform is this on? You need to be specific when reporting these types
> of errors....
>
>
>
> On 5/8/12 4:49 PM, "Ted Walther" <tederific at gmail.com> wrote:
>
> Compiling mod_spandsp_modem.c ...
> cc1: warnings being treated as errors
> mod_spandsp_modem.c: In function 'modem_init':
> mod_spandsp_modem.c:380: warning: ISO C90 forbids mixed declarations and
> code
> mod_spandsp_modem.c:398: error: invalid storage class for function
> 'channel_on_init'
> mod_spandsp_modem.c:399: error: invalid storage class for function
> 'channel_on_hangup'
> mod_spandsp_modem.c:400: error: invalid storage class for function
> 'channel_on_destroy'
> mod_spandsp_modem.c:401: error: invalid storage class for function
> 'channel_on_routing'
> mod_spandsp_modem.c:402: error: invalid storage class for function
> 'channel_on_exchange_media'
> mod_spandsp_modem.c:403: error: invalid storage class for function
> 'channel_on_soft_execute'
> mod_spandsp_modem.c:407: error: invalid storage class for function
> 'channel_outgoing_channel'
> mod_spandsp_modem.c:408: error: invalid storage class for function
> 'channel_read_frame'
> mod_spandsp_modem.c:409: error: invalid storage class for function
> 'channel_write_frame'
> mod_spandsp_modem.c:410: error: invalid storage class for function
> 'channel_kill_channel'
> mod_spandsp_modem.c:419: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:419: error: invalid storage class for function
> 'channel_on_init'
> mod_spandsp_modem.c: In function 'channel_on_init':
> mod_spandsp_modem.c:445: warning: implicit declaration of function 'ioctl'
> mod_spandsp_modem.c: In function 'modem_init':
> mod_spandsp_modem.c:489: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:489: error: invalid storage class for function
> 'channel_on_routing'
> mod_spandsp_modem.c:503: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:503: error: invalid storage class for function
> 'channel_on_execute'
> mod_spandsp_modem.c:519: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:519: error: invalid storage class for function
> 'channel_on_destroy'
> mod_spandsp_modem.c:543: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:543: error: invalid storage class for function
> 'channel_on_hangup'
> mod_spandsp_modem.c:560: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:560: error: invalid storage class for function
> 'channel_kill_channel'
> mod_spandsp_modem.c:586: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:586: error: invalid storage class for function
> 'channel_on_soft_execute'
> mod_spandsp_modem.c:592: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:592: error: invalid storage class for function
> 'channel_on_exchange_media'
> mod_spandsp_modem.c:608: warning: ISO C forbids nested functions
> mod_spandsp_modem.c:608: error: invalid storage class for function
> 'channel_on_reset'
>
> It looks to me like the error is here:
>
> #if USE_OPENPTY
>     if (openpty(&modem->master, &modem->slave, NULL, NULL, NULL)) {
>
>         if (modem->master < 0) {
>                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
> "Fatal error: failed to initialize pty\n");
>                 status = SWITCH_STATUS_FALSE;
>                 goto end;
>     }
>
>         modem->stty = ttyname(modem->slave);
> #else
>
>
> I traced to the bottom of the function, and didn't see a matching close
> brace.  I believe it is the if(modem->master < 0){ statement that is missing
> the closing } after the goto end; statement.
>
> Can a more knowledgeable developer confirm that this is correct.
>
> Ted
>
> ________________________________
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list