Compiling mod_spandsp_modem.c ...<br>cc1: warnings being treated as errors<br>mod_spandsp_modem.c: In function 'modem_init':<br>mod_spandsp_modem.c:380: warning: ISO C90 forbids mixed declarations and code<br>mod_spandsp_modem.c:398: error: invalid storage class for function 'channel_on_init'<br>
mod_spandsp_modem.c:399: error: invalid storage class for function 'channel_on_hangup'<br>mod_spandsp_modem.c:400: error: invalid storage class for function 'channel_on_destroy'<br>mod_spandsp_modem.c:401: error: invalid storage class for function 'channel_on_routing'<br>
mod_spandsp_modem.c:402: error: invalid storage class for function 'channel_on_exchange_media'<br>mod_spandsp_modem.c:403: error: invalid storage class for function 'channel_on_soft_execute'<br>mod_spandsp_modem.c:407: error: invalid storage class for function 'channel_outgoing_channel'<br>
mod_spandsp_modem.c:408: error: invalid storage class for function 'channel_read_frame'<br>mod_spandsp_modem.c:409: error: invalid storage class for function 'channel_write_frame'<br>mod_spandsp_modem.c:410: error: invalid storage class for function 'channel_kill_channel'<br>
mod_spandsp_modem.c:419: warning: ISO C forbids nested functions<br>mod_spandsp_modem.c:419: error: invalid storage class for function 'channel_on_init'<br>mod_spandsp_modem.c: In function 'channel_on_init':<br>
mod_spandsp_modem.c:445: warning: implicit declaration of function 'ioctl'<br>mod_spandsp_modem.c: In function 'modem_init':<br>mod_spandsp_modem.c:489: warning: ISO C forbids nested functions<br>mod_spandsp_modem.c:489: error: invalid storage class for function 'channel_on_routing'<br>
mod_spandsp_modem.c:503: warning: ISO C forbids nested functions<br>mod_spandsp_modem.c:503: error: invalid storage class for function 'channel_on_execute'<br>mod_spandsp_modem.c:519: warning: ISO C forbids nested functions<br>
mod_spandsp_modem.c:519: error: invalid storage class for function 'channel_on_destroy'<br>mod_spandsp_modem.c:543: warning: ISO C forbids nested functions<br>mod_spandsp_modem.c:543: error: invalid storage class for function 'channel_on_hangup'<br>
mod_spandsp_modem.c:560: warning: ISO C forbids nested functions<br>mod_spandsp_modem.c:560: error: invalid storage class for function 'channel_kill_channel'<br>mod_spandsp_modem.c:586: warning: ISO C forbids nested functions<br>
mod_spandsp_modem.c:586: error: invalid storage class for function 'channel_on_soft_execute'<br>mod_spandsp_modem.c:592: warning: ISO C forbids nested functions<br>mod_spandsp_modem.c:592: error: invalid storage class for function 'channel_on_exchange_media'<br>
mod_spandsp_modem.c:608: warning: ISO C forbids nested functions<br>mod_spandsp_modem.c:608: error: invalid storage class for function 'channel_on_reset'<br><br>It looks to me like the error is here:<br><br>#if USE_OPENPTY<br>
if (openpty(&modem->master, &modem->slave, NULL, NULL, NULL)) {<br><br> if (modem->master < 0) {<br> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Fatal error: failed to initialize pty\n");<br>
status = SWITCH_STATUS_FALSE;<br> goto end;<br> }<br><br> modem->stty = ttyname(modem->slave);<br>#else<br><br><br>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.<br>
<br>Can a more knowledgeable developer confirm that this is correct.<br><br>Ted<br>