Skip to content
Permalink
Browse files

core, bugfix: compile warning on linux.

  • Loading branch information...
xicilion committed Oct 5, 2018
1 parent 0c0eb1b commit c269bd770e89885b0d90e73958182d6cdfa17c2a
2 build
@@ -212,7 +212,7 @@ printf "\t| ( \\/ ) ( | ( ) ) ) ( | ( \\/\n"
printf "\t| (__ | | | (__/ / | | | (_____ \n"
printf "\t| __) | | | __ ( | | (_____ )\n"
printf "\t| ( | | | ( \\ \\ | | ) |\n"
printf "\t| (_ ___) (___|___) )/\\_) ) /\\____) |\n"
printf "\t| (_ ___) (___| (___) )/\\_) ) /\\____) |\n"
printf "\t(__/ \\_______/(______/ \\____/ \\_______)\n"
printf "${txtrst}"

@@ -632,7 +632,7 @@ inline result_t _relative(exlib::string from, exlib::string to, exlib::string& r

// Trim any leading backslashes
int32_t fromStart = 1;
for (; fromStart < from.length(); ++fromStart) {
for (; fromStart < (int32_t)from.length(); ++fromStart) {
if (!isPosixPathSlash(from[fromStart]))
break;
}
@@ -641,7 +641,7 @@ inline result_t _relative(exlib::string from, exlib::string to, exlib::string& r

// Trim any leading backslashes
int32_t toStart = 1;
for (; toStart < to.length(); ++toStart) {
for (; toStart < (int32_t)to.length(); ++toStart) {
if (!isPosixPathSlash(to[toStart]))
break;
}
@@ -744,7 +744,7 @@ inline result_t _relative_win32(exlib::string from, exlib::string to, exlib::str

// Trim any leading backslashes
int32_t fromStart = 0;
for (; fromStart < from.length(); ++fromStart) {
for (; fromStart < (int32_t)from.length(); ++fromStart) {
if (!isWin32PathSlash(from[fromStart]))
break;
}
@@ -758,7 +758,7 @@ inline result_t _relative_win32(exlib::string from, exlib::string to, exlib::str

// Trim any leading backslashes
int32_t toStart = 0;
for (; toStart < to.length(); ++toStart) {
for (; toStart < (int32_t)to.length(); ++toStart) {
if (!isWin32PathSlash(to[toStart]))
break;
}
@@ -188,7 +188,7 @@ result_t SandBox::setModuleCompiler(exlib::string extname, v8::Local<v8::Functio
if (extname[0] != '.')
return CALL_E_INVALIDARG;

for (int i = 0; i < ARRAYSIZE(predefine_exts); i++)
for (int32_t i = 0; i < (int32_t)ARRAYSIZE(predefine_exts); i++)
if (extname == predefine_exts[i])
return CHECK_ERROR(Runtime::setError("SandBox: '" + extname + "' is reserved extension name!"));

@@ -17,8 +17,6 @@ result_t CustomExtLoader::compile(SandBox::Context* ctx, Buffer_base* src, exlib
exlib::string arg_names, v8::Local<v8::Script>& script)
{
Isolate* isolate = ctx->m_sb->holder();
v8::Local<v8::String> soname = isolate->NewString(name);

v8::Local<v8::Value> require_fn = ctx->m_sb->GetPrivate(SandBox::_get_extloader_pname(m_ext));

exlib::string strScript;
@@ -137,7 +137,7 @@ result_t util_base::deepFreeze(v8::Local<v8::Value> v)
v8::Local<v8::Array> names = obj->GetPropertyNames(obj->CreationContext())
.ToLocalChecked();

for (int32_t i = 0; (int32_t)i < names->Length(); i++)
for (int32_t i = 0; i < (int32_t)names->Length(); i++)
deepFreeze(obj->Get(names->Get(i)));
}

0 comments on commit c269bd7

Please sign in to comment.
You can’t perform that action at this time.