forked from Mirrors/freeswitch
Merge pull request #458 from signalwire/v8
[mod_v8] Fix scan-build warnings.
This commit is contained in:
commit
ac328bb2d0
@ -201,7 +201,6 @@ static switch_status_t v8_mod_load_file(const char *filename)
|
||||
function_handle = (switch_loadable_module_function_table_t *)switch_dso_data_sym(dso, "v8_mod_init", &derr);
|
||||
|
||||
if (!function_handle || derr) {
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
err = derr;
|
||||
goto err;
|
||||
}
|
||||
@ -1458,7 +1457,7 @@ SWITCH_STANDARD_API(process_status_function)
|
||||
|
||||
} else if (!strcasecmp(as, "xml")) {
|
||||
switch_snprintf(tmp_str, sizeof(tmp_str), "%u", count);
|
||||
switch_xml_set_attr(switch_xml_set_flag(xml, SWITCH_XML_DUP), strdup("row_count"), strdup(tmp_str));
|
||||
switch_xml_set_attr_d(xml, "row_count", tmp_str);
|
||||
|
||||
output_text = switch_xml_toxml(xml, SWITCH_FALSE);
|
||||
|
||||
|
@ -301,7 +301,6 @@ JS_COREDB_FUNCTION_IMPL(Prepare)
|
||||
JS_COREDB_FUNCTION_IMPL(BindText)
|
||||
{
|
||||
HandleScope handle_scope(info.GetIsolate());
|
||||
bool status;
|
||||
int32_t param_index = -1;
|
||||
string param_value;
|
||||
|
||||
@ -324,7 +323,6 @@ JS_COREDB_FUNCTION_IMPL(BindText)
|
||||
}
|
||||
|
||||
/* convert args */
|
||||
status = !info[0].IsEmpty() && info[0]->IsInt32() ? true : false;
|
||||
param_index = info[0]->Int32Value();
|
||||
String::Utf8Value str(info[1]);
|
||||
param_value = js_safe_str(*str);
|
||||
@ -347,7 +345,6 @@ JS_COREDB_FUNCTION_IMPL(BindText)
|
||||
JS_COREDB_FUNCTION_IMPL(BindInt)
|
||||
{
|
||||
HandleScope handle_scope(info.GetIsolate());
|
||||
bool status;
|
||||
int32_t param_index = -1;
|
||||
int32_t param_value = -1;
|
||||
|
||||
@ -370,10 +367,7 @@ JS_COREDB_FUNCTION_IMPL(BindInt)
|
||||
}
|
||||
|
||||
/* convert args */
|
||||
status = !info[0].IsEmpty() && info[0]->IsInt32() ? true : false;
|
||||
param_index = info[0]->Int32Value();
|
||||
|
||||
status = !info[1].IsEmpty() && info[1]->IsInt32() ? true : false;
|
||||
param_value = info[1]->Int32Value();
|
||||
|
||||
if (param_index < 1) {
|
||||
|
@ -443,7 +443,7 @@ Isolate *JSMain::GetIsolate()
|
||||
#if defined(V8_MAJOR_VERSION) && V8_MAJOR_VERSION >=5
|
||||
void JSMain::Initialize(v8::Platform **platform)
|
||||
{
|
||||
bool res = V8::InitializeICUDefaultLocation(SWITCH_GLOBAL_dirs.mod_dir);
|
||||
V8::InitializeICUDefaultLocation(SWITCH_GLOBAL_dirs.mod_dir);
|
||||
V8::InitializeExternalStartupData(SWITCH_GLOBAL_dirs.mod_dir);
|
||||
|
||||
*platform = v8::platform::CreateDefaultPlatform();
|
||||
|
Loading…
Reference in New Issue
Block a user