diff --git a/src/mod/languages/mod_v8/src/fseventhandler.cpp b/src/mod/languages/mod_v8/src/fseventhandler.cpp index e4e256e689..145984c83f 100644 --- a/src/mod/languages/mod_v8/src/fseventhandler.cpp +++ b/src/mod/languages/mod_v8/src/fseventhandler.cpp @@ -389,10 +389,9 @@ JS_EVENTHANDLER_FUNCTION_IMPL(SendEvent) if (session_uuid.length() > 0) { /* This is a session event */ switch_core_session_t *session; - switch_status_t status = SWITCH_STATUS_FALSE; if ((session = switch_core_session_locate(session_uuid.c_str()))) { - if ((status = switch_core_session_queue_private_event(session, event, SWITCH_FALSE)) == SWITCH_STATUS_SUCCESS) { + if (switch_core_session_queue_private_event(session, event, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) { info.GetReturnValue().Set(true); } else { info.GetReturnValue().Set(false); diff --git a/src/mod/languages/mod_v8/src/fsodbc.cpp b/src/mod/languages/mod_v8/src/fsodbc.cpp index 5b34ebe36e..2b75661c50 100644 --- a/src/mod/languages/mod_v8/src/fsodbc.cpp +++ b/src/mod/languages/mod_v8/src/fsodbc.cpp @@ -273,7 +273,6 @@ JS_ODBC_FUNCTION_IMPL(NumCols) JS_ODBC_FUNCTION_IMPL(NextRow) { HandleScope handle_scope(info.GetIsolate()); - int result = 0; bool tf = false; if (switch_odbc_handle_get_state(_handle) != SWITCH_ODBC_STATE_CONNECTED) { @@ -282,7 +281,7 @@ JS_ODBC_FUNCTION_IMPL(NextRow) } if (_stmt) { - if ((result = SQLFetch(_stmt) == SQL_SUCCESS)) { + if (SQLFetch(_stmt) == SQL_SUCCESS) { tf = true; } } diff --git a/src/mod/languages/mod_v8/src/fssession.cpp b/src/mod/languages/mod_v8/src/fssession.cpp index c8a315ced0..d3bc77ae13 100644 --- a/src/mod/languages/mod_v8/src/fssession.cpp +++ b/src/mod/languages/mod_v8/src/fssession.cpp @@ -1250,7 +1250,6 @@ JS_SESSION_FUNCTION_IMPL(WaitForMedia) HandleScope handle_scope(info.GetIsolate()); switch_channel_t *channel; switch_time_t started; - unsigned int elapsed; int32_t timeout = 60000; bool ret = true; @@ -1273,7 +1272,7 @@ JS_SESSION_FUNCTION_IMPL(WaitForMedia) } for (;;) { - if (((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > (switch_time_t) timeout) + if (((/* Elapsed */(unsigned int)((switch_micro_time_now() - started) / 1000)) > (switch_time_t)timeout) || switch_channel_down(channel)) { info.GetReturnValue().Set(false); break; @@ -1297,7 +1296,6 @@ JS_SESSION_FUNCTION_IMPL(WaitForAnswer) HandleScope handle_scope(info.GetIsolate()); switch_channel_t *channel; switch_time_t started; - unsigned int elapsed; int32_t timeout = 60000; bool ret = true; @@ -1319,7 +1317,7 @@ JS_SESSION_FUNCTION_IMPL(WaitForAnswer) } for (;;) { - if (((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > (switch_time_t) timeout) + if (((/* Elapsed */(unsigned int)((switch_micro_time_now() - started) / 1000)) > (switch_time_t)timeout) || switch_channel_down(channel)) { info.GetReturnValue().Set(false); break;