mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
[core,miniupnpc,modules] Fix not used variables
This commit is contained in:
@@ -4087,7 +4087,6 @@ switch_status_t conference_api_sub_set(conference_obj_t *conference,
|
||||
|
||||
switch_status_t conference_api_sub_xml_list(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv)
|
||||
{
|
||||
int count = 0;
|
||||
switch_hash_index_t *hi;
|
||||
void *val;
|
||||
switch_xml_t x_conference, x_conferences;
|
||||
@@ -4106,7 +4105,6 @@ switch_status_t conference_api_sub_xml_list(conference_obj_t *conference, switch
|
||||
x_conference = switch_xml_add_child_d(x_conferences, "conference", off++);
|
||||
switch_assert(conference);
|
||||
|
||||
count++;
|
||||
conference_xlist(conference, x_conference, off);
|
||||
|
||||
}
|
||||
@@ -4114,7 +4112,7 @@ switch_status_t conference_api_sub_xml_list(conference_obj_t *conference, switch
|
||||
} else {
|
||||
x_conference = switch_xml_add_child_d(x_conferences, "conference", off++);
|
||||
switch_assert(conference);
|
||||
count++;
|
||||
|
||||
conference_xlist(conference, x_conference, off);
|
||||
}
|
||||
|
||||
|
||||
@@ -740,7 +740,7 @@ void conference_cdr_render(conference_obj_t *conference)
|
||||
#endif
|
||||
int wrote;
|
||||
wrote = write(fd, xml_text, (unsigned) strlen(xml_text));
|
||||
wrote++;
|
||||
(void)wrote;
|
||||
close(fd);
|
||||
} else {
|
||||
char ebuf[512] = { 0 };
|
||||
|
||||
@@ -161,7 +161,6 @@ static switch_status_t digit_action_callback(switch_ivr_dmachine_match_t *match)
|
||||
char *string = NULL;
|
||||
switch_channel_t *channel;
|
||||
switch_core_session_t *use_session = act->session;
|
||||
int x = 0;
|
||||
char *flags = "";
|
||||
|
||||
if (act->target == DIGIT_TARGET_PEER || act->target == DIGIT_TARGET_BOTH) {
|
||||
@@ -171,7 +170,6 @@ static switch_status_t digit_action_callback(switch_ivr_dmachine_match_t *match)
|
||||
}
|
||||
|
||||
top:
|
||||
x++;
|
||||
|
||||
string = switch_core_session_strdup(use_session, act->string);
|
||||
exec = 0;
|
||||
|
||||
@@ -3255,8 +3255,6 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
|
||||
switch_hash_index_t *hi;
|
||||
void *val;
|
||||
const void *vvar;
|
||||
int c = 0;
|
||||
int ac = 0;
|
||||
const char *header = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
|
||||
|
||||
if (argc > 0) {
|
||||
@@ -3466,7 +3464,6 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
|
||||
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
|
||||
|
||||
if (strcmp(vvar, profile->name)) {
|
||||
ac++;
|
||||
stream->write_function(stream, "<alias>\n<name>%s</name>\n<type>%s</type>\n<data>%s</data>\n<state>%s</state>\n</alias>\n", vvar, "alias",
|
||||
profile->name, "ALIASED");
|
||||
} else {
|
||||
@@ -3492,8 +3489,6 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
|
||||
profile->inuse);
|
||||
}
|
||||
|
||||
c++;
|
||||
|
||||
for (gp = profile->gateways; gp; gp = gp->next) {
|
||||
switch_assert(gp->state < REG_STATE_LAST);
|
||||
stream->write_function(stream, "<gateway>\n<name>%s</name>\n<type>%s</type>\n<data>%s</data>\n<state>%s</state>\n</gateway>\n",
|
||||
|
||||
@@ -1621,7 +1621,6 @@ void *SWITCH_THREAD_FUNC sofia_presence_event_thread_run(switch_thread_t *thread
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Event Thread Started\n");
|
||||
|
||||
while (mod_sofia_globals.running == 1) {
|
||||
int count = 0;
|
||||
|
||||
if (switch_queue_pop(mod_sofia_globals.presence_queue, &pop) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_t *event = (switch_event_t *) pop;
|
||||
@@ -1656,7 +1655,6 @@ void *SWITCH_THREAD_FUNC sofia_presence_event_thread_run(switch_thread_t *thread
|
||||
}
|
||||
|
||||
switch_event_destroy(&event);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -823,7 +823,6 @@ static void set_perm(const char *str, switch_event_t **event, switch_bool_t add)
|
||||
{
|
||||
char delim = ',';
|
||||
char *cur, *next;
|
||||
int count = 0;
|
||||
char *edup;
|
||||
|
||||
if (!zstr(str)) {
|
||||
@@ -844,7 +843,7 @@ static void set_perm(const char *str, switch_event_t **event, switch_bool_t add)
|
||||
delim = ' ';
|
||||
}
|
||||
|
||||
for (cur = edup; cur; count++) {
|
||||
for (cur = edup; cur;) {
|
||||
if ((next = strchr(cur, delim))) {
|
||||
*next++ = '\0';
|
||||
}
|
||||
@@ -5579,8 +5578,6 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
|
||||
{
|
||||
verto_profile_t *profile = NULL;
|
||||
jsock_t *jsock;
|
||||
int cp = 0;
|
||||
int cc = 0;
|
||||
const char *header = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
|
||||
int i;
|
||||
|
||||
@@ -5594,14 +5591,12 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
|
||||
stream->write_function(stream, "<profile>\n<name>%s</name>\n<type>%s</type>\n<data>%s</data>\n<state>%s</state>\n</profile>\n", profile->name, "profile", tmpurl, (profile->running) ? "RUNNING" : "DOWN");
|
||||
switch_safe_free(tmpurl);
|
||||
}
|
||||
cp++;
|
||||
|
||||
switch_mutex_lock(profile->mutex);
|
||||
for(jsock = profile->jsock_head; jsock; jsock = jsock->next) {
|
||||
char *tmpname = switch_mprintf("%s@%s", jsock->id, jsock->domain);
|
||||
stream->write_function(stream, "<client>\n<profile>%s</profile>\n<name>%s</name>\n<type>%s</type>\n<data>%s</data>\n<state>%s (%s)</state>\n</client>\n", profile->name, tmpname, "client", jsock->name,
|
||||
(!zstr(jsock->uid)) ? "CONN_REG" : "CONN_NO_REG", (jsock->ptype & PTYPE_CLIENT_SSL) ? "WSS": "WS");
|
||||
cc++;
|
||||
switch_safe_free(tmpname);
|
||||
}
|
||||
switch_mutex_unlock(profile->mutex);
|
||||
|
||||
@@ -866,7 +866,7 @@ SWITCH_STANDARD_API(event_sink_function)
|
||||
char *loglevel = switch_event_get_header(stream->param_event, "loglevel");
|
||||
switch_memory_pool_t *pool;
|
||||
char *next, *cur;
|
||||
uint32_t count = 0, key_count = 0;
|
||||
uint32_t key_count = 0;
|
||||
uint8_t custom = 0;
|
||||
char *edup;
|
||||
|
||||
@@ -925,7 +925,7 @@ SWITCH_STANDARD_API(event_sink_function)
|
||||
delim = ' ';
|
||||
}
|
||||
|
||||
for (cur = edup; cur; count++) {
|
||||
for (cur = edup; cur;) {
|
||||
switch_event_types_t type;
|
||||
|
||||
if ((next = strchr(cur, delim))) {
|
||||
@@ -1846,7 +1846,7 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
if (allowed_events) {
|
||||
char delim = ',';
|
||||
char *cur, *next;
|
||||
int count = 0, custom = 0, key_count = 0;
|
||||
int custom = 0;
|
||||
|
||||
switch_set_flag(listener, LFLAG_AUTH_EVENTS);
|
||||
|
||||
@@ -1862,7 +1862,7 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
delim = ' ';
|
||||
}
|
||||
|
||||
for (cur = edup; cur; count++) {
|
||||
for (cur = edup; cur;) {
|
||||
switch_event_types_t type;
|
||||
|
||||
if ((next = strchr(cur, delim))) {
|
||||
@@ -1872,7 +1872,6 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
if (custom) {
|
||||
switch_core_hash_insert(listener->allowed_event_hash, cur, MARKER);
|
||||
} else if (switch_name_event(cur, &type) == SWITCH_STATUS_SUCCESS) {
|
||||
key_count++;
|
||||
if (type == SWITCH_EVENT_ALL) {
|
||||
uint32_t x = 0;
|
||||
switch_set_flag(listener, LFLAG_ALL_EVENTS_AUTHED);
|
||||
@@ -1904,7 +1903,6 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
if (allowed_api) {
|
||||
char delim = ',';
|
||||
char *cur, *next;
|
||||
int count = 0;
|
||||
|
||||
switch_snprintf(api_reply, sizeof(api_reply), "Allowed-API: %s\n", allowed_api);
|
||||
|
||||
@@ -1916,7 +1914,7 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
delim = ' ';
|
||||
}
|
||||
|
||||
for (cur = edup; cur; count++) {
|
||||
for (cur = edup; cur;) {
|
||||
if ((next = strchr(cur, delim))) {
|
||||
*next++ = '\0';
|
||||
}
|
||||
@@ -2540,14 +2538,14 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
|
||||
|
||||
} else if (!strncasecmp(cmd, "nixevent", 8)) {
|
||||
char *next, *cur;
|
||||
uint32_t count = 0, key_count = 0;
|
||||
uint32_t key_count = 0;
|
||||
uint8_t custom = 0;
|
||||
|
||||
strip_cr(cmd);
|
||||
cur = cmd + 8;
|
||||
|
||||
if ((cur = strchr(cur, ' '))) {
|
||||
for (cur++; cur; count++) {
|
||||
for (cur++; cur;) {
|
||||
switch_event_types_t type;
|
||||
|
||||
if ((next = strchr(cur, ' '))) {
|
||||
|
||||
@@ -254,7 +254,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
||||
#endif
|
||||
int wrote;
|
||||
wrote = write(fd, xml_text, (unsigned) strlen(xml_text));
|
||||
wrote++;
|
||||
(void)wrote;
|
||||
close(fd);
|
||||
} else {
|
||||
char ebuf[512] = { 0 };
|
||||
@@ -427,7 +427,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
||||
#endif
|
||||
int wrote;
|
||||
wrote = write(fd, xml_text, (unsigned) strlen(xml_text));
|
||||
wrote++;
|
||||
(void)wrote;
|
||||
close(fd);
|
||||
} else {
|
||||
char ebuf[512] = { 0 };
|
||||
|
||||
Reference in New Issue
Block a user