Merge pull request #464 from dragos-oancea/mod_fifo-uninitialized-value

[mod_fifo] scan-build: Function call argument is an uninitialized value, fix dead assignments
This commit is contained in:
Andrey Volk 2020-03-06 00:58:05 +04:00 committed by GitHub
commit 90a7fc7125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1331,8 +1331,6 @@ static switch_status_t messagehook (switch_core_session_t *session, switch_core_
fifo_execute_sql_queued(&sql, SWITCH_TRUE, SWITCH_FALSE);
epoch_start = (long)switch_epoch_time_now(NULL);
ts = switch_micro_time_now();
switch_time_exp_lt(&tm, ts);
epoch_start = (long)switch_epoch_time_now(NULL);
@ -1538,7 +1536,6 @@ static void *SWITCH_THREAD_FUNC outbound_ringall_thread_run(switch_thread_t *thr
if (!pop) {
for (x = 0; x < MAX_PRI; x++) {
q = node->fifo_list[x];
if (fifo_queue_pop(node->fifo_list[x], &pop_dup, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS && pop_dup) {
pop = pop_dup;
break;
@ -2113,7 +2110,7 @@ static void *SWITCH_THREAD_FUNC node_thread_run(switch_thread_t *thread, void *o
while(node) {
int x = 0;
switch_event_t *pop;
switch_event_t *pop = NULL;
this_node = node;
node = node->next;
@ -2182,7 +2179,6 @@ static void *SWITCH_THREAD_FUNC node_thread_run(switch_thread_t *thread, void *o
if (cur_priority == 1 || need_sleep) {
switch_yield(1000000);
need_sleep = 0;
}
}
@ -2567,7 +2563,7 @@ SWITCH_STANDARD_APP(fifo_function)
switch_event_t *event = NULL;
char date[80] = "";
switch_time_exp_t tm;
switch_time_t ts = switch_micro_time_now();
switch_time_t ts;
switch_size_t retsize;
char *list_string;
int nlist_count;
@ -4098,7 +4094,7 @@ static void list_node(fifo_node_t *node, switch_xml_t x_report, int *off, int ve
cc_off = xml_outbound(x_fifo, node, "outbound", "member", cc_off, verbose);
cc_off = xml_caller(x_fifo, node, "callers", "caller", cc_off, verbose);
cc_off = xml_hash(x_fifo, node->consumer_hash, "consumers", "consumer", cc_off, verbose);
cc_off = xml_bridges(x_fifo, node, "bridges", "bridge", cc_off, verbose);
xml_bridges(x_fifo, node, "bridges", "bridge", cc_off, verbose);
}
void dump_hash(switch_hash_t *hash, switch_stream_handle_t *stream)