]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FreeTDM: gcc-4.6 fix (-Wunused-but-set)
authorStefan Knoblich <s.knoblich@axsentis.de>
Sat, 14 May 2011 21:59:14 +0000 (23:59 +0200)
committerStefan Knoblich <s.knoblich@axsentis.de>
Sat, 14 May 2011 21:59:14 +0000 (23:59 +0200)
ftmod_wanpipe.c:
Remove myerrno variable in wanpipe_read(),
snprintf does not set errno (according to the manpage),
so no need to save it (without even using it later).

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c

index 3a2e72e69b9e725ee94a4055b7e4bebd9f5ee864..2bf9f6bc2e1e35f922970c2493f0522832073d2b 100644 (file)
@@ -950,7 +950,6 @@ static void wanpipe_read_stats(ftdm_channel_t *ftdmchan, wp_tdm_api_rx_hdr_t *rx
 static FIO_READ_FUNCTION(wanpipe_read)
 {
        int rx_len = 0;
-       int myerrno = 0;
        wp_tdm_api_rx_hdr_t hdrframe;
 
        memset(&hdrframe, 0, sizeof(hdrframe));
@@ -964,7 +963,6 @@ static FIO_READ_FUNCTION(wanpipe_read)
        }
 
        if (rx_len < 0) {
-               myerrno = errno;
                snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "%s", strerror(errno));
                ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Failed to read from sangoma device: %s (%d)\n", strerror(errno), rx_len);
                return FTDM_FAIL;