From c804b16e4c6b423d23d51db222df1c7f8c466b9f Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sat, 26 Mar 2016 12:11:11 +0100 Subject: [PATCH] fix compiler warnings --- v8js_class.cc | 2 +- v8js_exceptions.cc | 6 +++--- v8js_methods.cc | 4 ++-- v8js_v8object_class.cc | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/v8js_class.cc b/v8js_class.cc index 65c4993..4d8a638 100644 --- a/v8js_class.cc +++ b/v8js_class.cc @@ -671,7 +671,7 @@ static void v8js_execute_script(zval *this_ptr, v8js_script *res, long flags, lo */ static PHP_METHOD(V8Js, executeString) { - char *str = NULL, *identifier = NULL, *tz = NULL; + char *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; diff --git a/v8js_exceptions.cc b/v8js_exceptions.cc index 4ee35fd..d0745c7 100644 --- a/v8js_exceptions.cc +++ b/v8js_exceptions.cc @@ -46,7 +46,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8:: v8::Handle tc_message = try_catch->Message(); const char *filename_string, *sourceline_string; char *message_string; - int linenum, start_col, end_col, message_len; + int linenum, start_col, end_col; object_init_ex(return_value, php_ce_v8js_script_exception); @@ -54,7 +54,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8:: zend_update_property##type(php_ce_v8js_script_exception, return_value, #name, sizeof(#name) - 1, value TSRMLS_CC); if (tc_message.IsEmpty()) { - message_len = spprintf(&message_string, 0, "%s", exception_string); + spprintf(&message_string, 0, "%s", exception_string); } else { @@ -75,7 +75,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8:: end_col = tc_message->GetEndColumn(); PHPV8_EXPROP(_long, JsEndColumn, end_col); - message_len = spprintf(&message_string, 0, "%s:%d: %s", filename_string, linenum, exception_string); + spprintf(&message_string, 0, "%s:%d: %s", filename_string, linenum, exception_string); v8::String::Utf8Value stacktrace(try_catch->StackTrace()); if (stacktrace.length() > 0) { diff --git a/v8js_methods.cc b/v8js_methods.cc index 9cde0cf..0719b72 100644 --- a/v8js_methods.cc +++ b/v8js_methods.cc @@ -112,7 +112,7 @@ static void v8js_dumper(v8::Isolate *isolate, v8::Local var, int leve if (var->IsString()) { - php_printf("string(%zu) \"", valstr_len, valstr); + php_printf("string(%zu) \"", valstr_len); PHPWRITE(valstr, valstr_len); php_printf("\"\n"); } @@ -464,7 +464,7 @@ V8JS_METHOD(require) c->modules_base.push_back(normalised_path); // Run script - v8::Local result = script->Run(); + script->Run(); // Remove this module and path from the stack c->modules_stack.pop_back(); diff --git a/v8js_v8object_class.cc b/v8js_v8object_class.cc index dd90662..6ae5315 100644 --- a/v8js_v8object_class.cc +++ b/v8js_v8object_class.cc @@ -194,7 +194,6 @@ static void v8js_v8object_unset_property(zval *object, zval *member ZEND_HASH_KE static HashTable *v8js_v8object_get_properties(zval *object TSRMLS_DC) /* {{{ */ { v8js_v8object *obj = (v8js_v8object *) zend_object_store_get_object(object TSRMLS_CC); - HashTable *retval; if (obj->properties == NULL) { if (GC_G(gc_active)) {