0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 18:41:52 +00:00

fix compiler warnings

This commit is contained in:
Stefan Siegl 2016-03-26 12:11:11 +01:00
parent 3d5f163899
commit c804b16e4c
4 changed files with 6 additions and 7 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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();

View File

@ -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)) {