0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-09 16:28:41 +00:00

fix compiler warnings

This commit is contained in:
Stefan Siegl 2016-07-03 22:31:09 +02:00
parent 4161008417
commit 157f34521e
3 changed files with 4 additions and 9 deletions

View File

@ -638,7 +638,6 @@ static void v8js_execute_script(zval *this_ptr, v8js_script *res, long flags, lo
static PHP_METHOD(V8Js, executeString)
{
zend_string *str = NULL, *identifier = NULL;
int str_len = 0, identifier_len = 0;
long flags = V8JS_FLAG_NONE, time_limit = 0, memory_limit = 0;
v8js_script *res = NULL;
@ -671,7 +670,6 @@ static PHP_METHOD(V8Js, executeString)
static PHP_METHOD(V8Js, compileString)
{
zend_string *str = NULL, *identifier = NULL;
int str_len = 0, identifier_len = 0;
v8js_script *res = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|S", &str, &identifier) == FAILURE) {
@ -686,7 +684,6 @@ static PHP_METHOD(V8Js, compileString)
ctx = Z_V8JS_CTX_OBJ_P(getThis());
ctx->script_objects.push_back(res);
}
return;
}
/* }}} */
@ -716,7 +713,6 @@ static PHP_METHOD(V8Js, executeScript)
static PHP_METHOD(V8Js, checkString)
{
zend_string *str = NULL;
int str_len = 0;
zend_string *identifier = zend_string_init("V8Js::checkString()", 19, 0);
v8js_script *res = NULL;

View File

@ -39,10 +39,11 @@ static void v8js_call_php_func(zend_object *object, zend_function *method_ptr, v
v8::Handle<v8::Value> return_value = V8JS_NULL;
zend_fcall_info fci;
zend_fcall_info_cache fcc;
zval fname, retval, **argv = NULL;
zval fname, retval;
unsigned int argc = info.Length(), min_num_args = 0, max_num_args = 0;
char *error;
int error_len, i;
int error_len;
unsigned int i;
v8js_ctx *ctx = (v8js_ctx *) isolate->GetData(0);
@ -779,7 +780,7 @@ static v8::Handle<v8::Object> v8js_wrap_object(v8::Isolate *isolate, zend_class_
bool has_array_access = false;
bool has_countable = false;
for (int i = 0; i < ce->num_interfaces; i ++) {
for (unsigned int i = 0; i < ce->num_interfaces; i ++) {
if (strcmp (ZSTR_VAL(ce->interfaces[i]->name), "ArrayAccess") == 0) {
has_array_access = true;
}

View File

@ -510,8 +510,6 @@ static void v8js_v8generator_next(v8js_v8generator *g) /* {{{ */
* some memory on bailout. */
{
std::function< v8::Local<v8::Value>(v8::Isolate *) > v8_call = [g](v8::Isolate *isolate) {
int i = 0;
v8::Local<v8::String> method_name = V8JS_STR("next");
v8::Local<v8::Object> v8obj = v8::Local<v8::Value>::New(isolate, g->v8obj.v8obj)->ToObject();
v8::Local<v8::Function> cb = v8::Local<v8::Function>::Cast(v8obj->Get(method_name));;