From: Stefan Knoblich Date: Sat, 14 May 2011 21:59:14 +0000 (+0200) Subject: FreeTDM: gcc-4.6 fix (-Wunused-but-set) X-Git-Tag: v1.2-rc1~118^2~6^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cceb8e62ca2473df5cb564d97b0b404c96212e4;p=thirdparty%2Ffreeswitch.git FreeTDM: gcc-4.6 fix (-Wunused-but-set) 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 --- diff --git a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c index 3a2e72e69b..2bf9f6bc2e 100644 --- a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c +++ b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c @@ -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;