error in mod_spandsp_modem.c
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
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@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
I found it on openbsd. Putting the closing brace in, fixed the compile. I dont think it was specific to openbsd. I did find a few openbsd specific things today, of which more anon. On May 8, 2012 7:22 PM, "Ken Rice" <krice@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@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
fixed but you should have reported it to http://jira.freeswitch.org On Tue, May 8, 2012 at 9:20 PM, Ken Rice <krice@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@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@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@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Thank you, I will do so in future. Ted On 8 May 2012 19:31, Anthony Minessale <anthony.minessale@gmail.com> wrote:
fixed but you should have reported it to http://jira.freeswitch.org
On Tue, May 8, 2012 at 9:20 PM, Ken Rice <krice@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@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@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@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
participants (3)
-
Anthony Minessale
-
Ken Rice
-
Ted Walther