mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
FreeTDM: gcc-4.6 fixes (-Wunused-but-set)
ftdm_io.c: Remove cut_path() function and call since it didn't seem to do anything useful anyway. ftmod_analog.c/ftmod_analog_em.c: Remove status variable that was used for the result of codec_func(), but was never checked for errors or returned to the caller. libteletone_generate.c: Remove unused variable "var". Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
This commit is contained in:
@@ -310,21 +310,6 @@ FTDM_STR2ENUM(ftdm_str2channel_indication, ftdm_channel_indication2str, ftdm_cha
|
||||
|
||||
static ftdm_status_t ftdm_group_add_channels(ftdm_span_t* span, int currindex, const char* name);
|
||||
|
||||
static const char *cut_path(const char *in)
|
||||
{
|
||||
const char *p, *ret = in;
|
||||
char delims[] = "/\\";
|
||||
char *i;
|
||||
|
||||
for (i = delims; *i; i++) {
|
||||
p = in;
|
||||
while ((p = strchr(p, *i)) != 0) {
|
||||
ret = ++p;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void null_logger(const char *file, const char *func, int line, int level, const char *fmt, ...)
|
||||
{
|
||||
if (file && func && line && level && fmt) {
|
||||
@@ -350,7 +335,6 @@ static int ftdm_log_level = FTDM_LOG_LEVEL_DEBUG;
|
||||
|
||||
static void default_logger(const char *file, const char *func, int line, int level, const char *fmt, ...)
|
||||
{
|
||||
const char *fp;
|
||||
char data[1024];
|
||||
va_list ap;
|
||||
|
||||
@@ -360,14 +344,11 @@ static void default_logger(const char *file, const char *func, int line, int lev
|
||||
if (level > ftdm_log_level) {
|
||||
return;
|
||||
}
|
||||
|
||||
fp = cut_path(file);
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
vsnprintf(data, sizeof(data), fmt, ap);
|
||||
|
||||
|
||||
fprintf(stderr, "[%s] %s:%d %s() %s", FTDM_LEVEL_NAMES[level], file, line, func, data);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
Reference in New Issue
Block a user