Fix for -Wunused-but-set-variable required compiler. : mod_freetdm mod_avmd mod_cidlookup mod_ladspa mod_lcr mod_nibblebill mod_rss mod_vdm mod_dahdi_codec mod_skinny mod_cdr_pg_csv

This commit is contained in:
Marc Olivier Chouinard committed 2011-04-22 22:49:41 -04:00
1 parent 5bcf487df9
commit ba7dc9fde8
13 files changed
+23 -44

No files matched your search

+2 -2
View File
@@ -479,7 +479,7 @@ static void avmd_process(avmd_session_t *session, switch_frame_t *frame)
double success = 0.0;
double amp = 0.0;
double s_rate;
double e_rate;
// double e_rate;
double avg_a;
double sine_len;
uint32_t sine_len_i;
@@ -523,7 +523,7 @@ static void avmd_process(avmd_session_t *session, switch_frame_t *frame)
/*! Every once in a while we evaluate the desa2 and amplitude results */
if(((pos + 1) % sine_len_i) == 0){
s_rate = success / (error + success);
e_rate = error / (error + success);
// e_rate = error / (error + success);
avg_a = amp / sine_len;
/*! Results out of these ranges are considered invalid */
@@ -729,6 +729,9 @@ SWITCH_STANDARD_APP(cidlookup_app_function)
if (!session && pool) {
switch_core_destroy_memory_pool(&pool);
}
/* This is so compile doesn't failed because status is never used */
if (status) {
}
}
SWITCH_STANDARD_API(cidlookup_function)
+1 -2
View File
@@ -565,12 +565,11 @@ switch_status_t ladspa_session(switch_core_session_t *session, const char *flags
static void ladspa_parse(switch_core_session_t *session, const char *data)
{
char *argv[5] = { 0 };
int argc;
char *lbuf;
if (data) {
lbuf = strdup(data);
argc = switch_separate_string(lbuf, '|', argv, (sizeof(argv) / sizeof(argv[0])));
switch_separate_string(lbuf, '|', argv, (sizeof(argv) / sizeof(argv[0])));
ladspa_session(session, argv[0], argv[1], argv[2], argv[3]);
free(lbuf);
}
+4 -6
View File
@@ -248,14 +248,13 @@ static char *get_bridge_data(switch_memory_pool_t *pool, char *dialed_number, ch
size_t tstrip;
char *data = NULL;
char *destination_number = NULL;
char *orig_destination_number = NULL;
char *codec = NULL;
char *cid = NULL;
char *header = NULL;
char *user_rate = NULL;
char *export_fields = NULL;
orig_destination_number = destination_number = switch_core_strdup(pool, dialed_number);
destination_number = switch_core_strdup(pool, dialed_number);
tstrip = ((cur_route->digit_len - cur_route->tstrip) + 1);
lstrip = cur_route->lstrip;
@@ -1263,7 +1262,6 @@ static switch_call_cause_t lcr_outgoing_channel(switch_core_session_t *session,
const char *intralata = NULL;
switch_core_session_t *mysession = NULL;
switch_channel_t *channel = NULL;
switch_caller_profile_t *caller_profile = NULL;
dest = strdup(outbound_profile->destination_number);
@@ -1290,7 +1288,6 @@ static switch_call_cause_t lcr_outgoing_channel(switch_core_session_t *session,
timelimit = atoi(var);
}
routes.session = session;
caller_profile = switch_channel_get_caller_profile(channel);
intrastate = switch_channel_get_variable(channel, "intrastate");
intralata = switch_channel_get_variable(channel, "intralata");
cid_name_override = switch_channel_get_variable(channel, "origination_caller_id_name");
@@ -1670,7 +1667,7 @@ SWITCH_STANDARD_API(dialplan_lcr_function)
char *argv[4] = { 0 };
int argc;
char *mydata = NULL;
char *dialstring = NULL;
//char *dialstring = NULL;
char *lcr_profile = NULL;
lcr_route current = NULL;
max_obj_t maximum_lengths = { 0 };
@@ -1792,7 +1789,8 @@ SWITCH_STANDARD_API(dialplan_lcr_function)
current = cb_struct.head;
while (current) {
dialstring = get_bridge_data(pool, cb_struct.lookup_number, cb_struct.cid, current, cb_struct.profile, cb_struct.session);
//dialstring =
get_bridge_data(pool, cb_struct.lookup_number, cb_struct.cid, current, cb_struct.profile, cb_struct.session);
rowcount++;
if (as_xml) {
@@ -399,7 +399,7 @@ static switch_status_t do_billing(switch_core_session_t *session)
const char *billrate;
const char *billaccount;
float nobal_amt = globals.nobal_amt;
float lowbal_amt = globals.lowbal_amt;
//float lowbal_amt = globals.lowbal_amt;
float balance;
if (!session) {
@@ -421,10 +421,11 @@ static switch_status_t do_billing(switch_core_session_t *session)
if (!zstr(switch_channel_get_variable(channel, "nobal_amt"))) {
nobal_amt = (float)atof(switch_channel_get_variable(channel, "nobal_amt"));
}
/*
if (!zstr(switch_channel_get_variable(channel, "lowbal_amt"))) {
lowbal_amt = (float)atof(switch_channel_get_variable(channel, "lowbal_amt"));
}
*/
/* Return if there's no billing information on this session */
if (!billrate || !billaccount) {
return SWITCH_STATUS_SUCCESS;
@@ -802,9 +803,6 @@ SWITCH_STANDARD_API(nibblebill_api_function)
if ((argc == 2 || argc == 3) && !zstr(argv[0])) {
char *uuid = argv[0];
if ((psession = switch_core_session_locate(uuid))) {
switch_channel_t *channel;
channel = switch_core_session_get_channel(psession);
if (!strcasecmp(argv[1], "adjust") && argc == 3) {
nibblebill_adjust(psession, (float) atof(argv[2]));
} else if (!strcasecmp(argv[1], "flush")) {
+2 -2
View File
@@ -175,7 +175,7 @@ SWITCH_STANDARD_APP(rss_function)
char *filename = NULL;
char *argv[3], *feed_list[TTS_MAX_ENTRIES] = { 0 }, *feed_names[TTS_MAX_ENTRIES] = {
0};
int argc, feed_index = 0;
int feed_index = 0;
const char *cf = "rss.conf";
switch_xml_t cfg, cxml, feeds, feed;
char buf[1024] = "";
@@ -236,7 +236,7 @@ SWITCH_STANDARD_APP(rss_function)
if (!zstr(data)) {
if ((mydata = switch_core_session_strdup(session, data))) {
argc = switch_separate_string(mydata, ' ', argv, sizeof(argv) / sizeof(argv[0]));
switch_separate_string(mydata, ' ', argv, sizeof(argv) / sizeof(argv[0]));
if (argv[0]) {
engine = argv[0];
+1 -2
View File
@@ -237,9 +237,8 @@ static switch_bool_t process_data(vmd_session_info_t *vmd_info, switch_frame_t *
double pts[P];
int16_t *data;
int16_t max;
switch_ssize_t len;
len = frame->samples * sizeof(int16_t);
//len = frame->samples * sizeof(int16_t);
data = (int16_t *) frame->data;
for (max = (int16_t) abs(data[0]), i = 1; i < frame->samples; i++) {