소스 검색

fix compiler warnings

Stefan Siegl 9 년 전
부모
커밋
c804b16e4c
4개의 변경된 파일6개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 1
      v8js_class.cc
  2. 3 3
      v8js_exceptions.cc
  3. 2 2
      v8js_methods.cc
  4. 0 1
      v8js_v8object_class.cc

+ 1 - 1
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;

+ 3 - 3
v8js_exceptions.cc

@@ -46,7 +46,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
 	v8::Handle<v8::Message> 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) {

+ 2 - 2
v8js_methods.cc

@@ -112,7 +112,7 @@ static void v8js_dumper(v8::Isolate *isolate, v8::Local<v8::Value> 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<v8::Value> result = script->Run();
+	script->Run();
 
 	// Remove this module and path from the stack
 	c->modules_stack.pop_back();

+ 0 - 1
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)) {