php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55629
Patch bug55629.patch revision 2011-09-07 08:28 UTC by laruence@php.net
revision 2011-09-07 08:21 UTC by laruence@php.net

Patch bug55629.patch for Compile Warning Bug #55629

Patch version 2011-09-07 08:28 UTC

Return to Bug #55629 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: laruence@php.net

Index: Zend/zend_execute.c
===================================================================
--- Zend/zend_execute.c	(revision 316302)
+++ Zend/zend_execute.c	(working copy)
@@ -620,7 +620,7 @@
 		if (Z_TYPE_P(arg) == IS_OBJECT) {
 			need_msg = zend_verify_arg_class_kind(cur_arg_info, fetch_type, &class_name, &ce TSRMLS_CC);
 			if (!ce || !instanceof_function(Z_OBJCE_P(arg), ce TSRMLS_CC)) {
-				return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, need_msg, class_name, "instance of ", Z_OBJCE_P(arg)->name TSRMLS_CC);
+				return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, need_msg, class_name, "instance of ", (char *)Z_OBJCE_P(arg)->name TSRMLS_CC);
 			}
 		} else if (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null) {
 			need_msg = zend_verify_arg_class_kind(cur_arg_info, fetch_type, &class_name, &ce TSRMLS_CC);
Index: Zend/zend_language_scanner_defs.h
===================================================================
--- Zend/zend_language_scanner_defs.h	(revision 316302)
+++ Zend/zend_language_scanner_defs.h	(working copy)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Aug 18 01:37:48 2011 */
+/* Generated by re2c 0.13.5 on Wed Sep  7 16:04:43 2011 */
 #line 3 "Zend/zend_language_scanner_defs.h"
 
 enum YYCONDTYPE {
Index: Zend/zend_builtin_functions.c
===================================================================
--- Zend/zend_builtin_functions.c	(revision 316302)
+++ Zend/zend_builtin_functions.c	(working copy)
@@ -744,7 +744,7 @@
 ZEND_FUNCTION(get_class)
 {
 	zval *obj = NULL;
-	char *name = "";
+	const char *name = "";
 	zend_uint name_len = 0;
 	int dup;
 
@@ -1854,7 +1854,7 @@
    Get the resource type name for a given resource */
 ZEND_FUNCTION(get_resource_type)
 {
-	char *resource_type;
+	const char *resource_type;
 	zval *z_resource_type;
 
 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_resource_type) == FAILURE) {
@@ -2057,7 +2057,7 @@
 	ptr = ptr->prev_execute_data;
 
 	while (ptr && (limit == 0 || frameno < limit)) {
-		const char *free_class_name = NULL;
+		char *free_class_name = NULL;
 
 		frameno++;
 		class_name = call_type = NULL;   
@@ -2094,7 +2094,7 @@
 
 					dup = zend_get_object_classname(ptr->object, &class_name, &class_name_len TSRMLS_CC);
 					if(!dup) {
-						free_class_name = class_name;
+						free_class_name = (char *)class_name;
 					}
 				}
 
@@ -2270,13 +2270,13 @@
 
 			if (ptr->object && Z_TYPE_P(ptr->object) == IS_OBJECT) {
 				if (ptr->function_state.function->common.scope) {
-					add_assoc_string_ex(stack_frame, "class", sizeof("class"), ptr->function_state.function->common.scope->name, 1);
+					add_assoc_string_ex(stack_frame, "class", sizeof("class"), (char *)ptr->function_state.function->common.scope->name, 1);
 				} else {
 					zend_uint class_name_len;
 					int dup;
 
-					dup = zend_get_object_classname(ptr->object, &class_name, &class_name_len TSRMLS_CC);
-					add_assoc_string_ex(stack_frame, "class", sizeof("class"), class_name, dup);
+					dup = zend_get_object_classname(ptr->object, (const char **)&class_name, &class_name_len TSRMLS_CC);
+					add_assoc_string_ex(stack_frame, "class", sizeof("class"), (char *)class_name, dup);
 					
 				}
 				if ((options & DEBUG_BACKTRACE_PROVIDE_OBJECT) != 0) {
@@ -2286,7 +2286,7 @@
 
 				add_assoc_string_ex(stack_frame, "type", sizeof("type"), "->", 1);
 			} else if (ptr->function_state.function->common.scope) {
-				add_assoc_string_ex(stack_frame, "class", sizeof("class"), ptr->function_state.function->common.scope->name, 1);
+				add_assoc_string_ex(stack_frame, "class", sizeof("class"), (char *)ptr->function_state.function->common.scope->name, 1);
 				add_assoc_string_ex(stack_frame, "type", sizeof("type"), "::", 1);
 			}
 
Index: Zend/zend_highlight.c
===================================================================
--- Zend/zend_highlight.c	(revision 316302)
+++ Zend/zend_highlight.c	(working copy)
@@ -58,10 +58,10 @@
 {
 	const char *ptr=s, *end=s+len;
 	char *filtered;
-	int filtered_len;
+	size_t filtered_len;
 
 	if (LANG_SCNG(output_filter)) {
-		LANG_SCNG(output_filter)(&filtered, &filtered_len, s, len TSRMLS_CC);
+		LANG_SCNG(output_filter)((unsigned char **)&filtered, &filtered_len, s, len TSRMLS_CC);
 		ptr = filtered;
 		end = filtered + filtered_len;
 	}
Index: Zend/zend_constants.c
===================================================================
--- Zend/zend_constants.c	(revision 316302)
+++ Zend/zend_constants.c	(working copy)
@@ -462,7 +462,7 @@
 		/* keep in mind that c->name_len already contains the '\0' */
 		lowercase_name = estrndup(c->name, c->name_len-1);
 		zend_str_tolower(lowercase_name, c->name_len-1);
-		lowercase_name = zend_new_interned_string(lowercase_name, c->name_len, 1 TSRMLS_CC);
+		lowercase_name = (char *)zend_new_interned_string(lowercase_name, c->name_len, 1 TSRMLS_CC);
 		name = lowercase_name;
 		chash = IS_INTERNED(lowercase_name) ? INTERNED_HASH(lowercase_name) : 0;
 	} else {
@@ -470,7 +470,7 @@
 		if(slash) {
 			lowercase_name = estrndup(c->name, c->name_len-1);
 			zend_str_tolower(lowercase_name, slash-c->name);
-			lowercase_name = zend_new_interned_string(lowercase_name, c->name_len, 1 TSRMLS_CC);
+			lowercase_name = (char *)zend_new_interned_string(lowercase_name, c->name_len, 1 TSRMLS_CC);
 			name = lowercase_name;
 			
 			chash = IS_INTERNED(lowercase_name) ? INTERNED_HASH(lowercase_name) : 0;
Index: Zend/zend_compile.c
===================================================================
--- Zend/zend_compile.c	(revision 316302)
+++ Zend/zend_compile.c	(working copy)
@@ -321,7 +321,7 @@
 		CG(context).vars_size += 16; /* FIXME */
 		op_array->vars = erealloc(op_array->vars, CG(context).vars_size * sizeof(zend_compiled_variable));
 	}
-	op_array->vars[i].name = zend_new_interned_string(name, name_len + 1, 1 TSRMLS_CC);
+	op_array->vars[i].name = (char *)zend_new_interned_string(name, name_len + 1, 1 TSRMLS_CC);
 	op_array->vars[i].name_len = name_len;
 	op_array->vars[i].hash_value = hash_value;
 	return i;
@@ -344,7 +344,7 @@
 {
 	if (Z_TYPE_P(zv) == IS_STRING || Z_TYPE_P(zv) == IS_CONSTANT) {
 		zval *z = (zval*)zv;
-		Z_STRVAL_P(z) = zend_new_interned_string(Z_STRVAL_P(zv), Z_STRLEN_P(zv) + 1, 1 TSRMLS_CC);
+		Z_STRVAL_P(z) = (char *)zend_new_interned_string(Z_STRVAL_P(zv), Z_STRLEN_P(zv) + 1, 1 TSRMLS_CC);
 	}
 	CONSTANT_EX(op_array, literal_position) = *zv;
 	Z_SET_REFCOUNT(CONSTANT_EX(op_array, literal_position), 2);
@@ -500,7 +500,7 @@
 		name_len = Z_STRLEN_P(zv);
 		name = Z_STRVAL_P(zv);
 	}
-	ns_separator = zend_memrchr(name, '\\', name_len);
+	ns_separator = (char *)zend_memrchr(name, '\\', name_len);
 	if (ns_separator) {
 		ns_len = ns_separator - name;
 	} else {
@@ -1576,7 +1576,7 @@
 	if (is_method) {
 		int result;
 		
-		lcname = zend_new_interned_string(zend_str_tolower_dup(name, name_len), name_len + 1, 1 TSRMLS_CC);
+		lcname = (char *)zend_new_interned_string(zend_str_tolower_dup(name, name_len), name_len + 1, 1 TSRMLS_CC);
 
 		if (IS_INTERNED(lcname)) {
 			result = zend_hash_quick_add(&CG(active_class_entry)->function_table, lcname, name_len+1, INTERNED_HASH(lcname), &op_array, sizeof(zend_op_array), (void **) &CG(active_op_array));
@@ -1878,7 +1878,7 @@
 	}
 	CG(active_op_array)->arg_info = erealloc(CG(active_op_array)->arg_info, sizeof(zend_arg_info)*(CG(active_op_array)->num_args));
 	cur_arg_info = &CG(active_op_array)->arg_info[CG(active_op_array)->num_args-1];
-	cur_arg_info->name = zend_new_interned_string(estrndup(varname->u.constant.value.str.val, varname->u.constant.value.str.len), varname->u.constant.value.str.len + 1, 1 TSRMLS_CC);
+	cur_arg_info->name = (char *)zend_new_interned_string(estrndup(varname->u.constant.value.str.val, varname->u.constant.value.str.len), varname->u.constant.value.str.len + 1, 1 TSRMLS_CC);
 	cur_arg_info->name_len = varname->u.constant.value.str.len;
 	cur_arg_info->type_hint = 0;
 	cur_arg_info->allow_null = 1;
@@ -1913,7 +1913,7 @@
 				if (ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_type->u.constant), Z_STRLEN(class_type->u.constant))) {
 					zend_resolve_class_name(class_type, opline->extended_value, 1 TSRMLS_CC);
 				}
-				class_type->u.constant.value.str.val = zend_new_interned_string(class_type->u.constant.value.str.val, class_type->u.constant.value.str.len + 1, 1 TSRMLS_CC);
+				class_type->u.constant.value.str.val = (char *)zend_new_interned_string(class_type->u.constant.value.str.val, class_type->u.constant.value.str.len + 1, 1 TSRMLS_CC);
 				cur_arg_info->class_name = class_type->u.constant.value.str.val;
 				cur_arg_info->class_name_len = class_type->u.constant.value.str.len;
 				if (op == ZEND_RECV_INIT) {
@@ -2969,7 +2969,7 @@
 			if (fe->common.type != ZEND_USER_FUNCTION) {
 				return 0;
 			} else if (strchr(proto->common.arg_info[i].class_name, '\\') != NULL ||
-			    (colon = zend_memrchr(fe->common.arg_info[i].class_name, '\\', fe->common.arg_info[i].class_name_len)) == NULL ||
+			    (colon = (char *)zend_memrchr(fe->common.arg_info[i].class_name, '\\', fe->common.arg_info[i].class_name_len)) == NULL ||
 			    strcasecmp(colon+1, proto->common.arg_info[i].class_name) != 0) {
 				zend_class_entry **fe_ce, **proto_ce;
 				int found, found2;
@@ -4673,7 +4673,7 @@
 
 	new_class_entry = emalloc(sizeof(zend_class_entry));
 	new_class_entry->type = ZEND_USER_CLASS;
-	new_class_entry->name = zend_new_interned_string(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant) + 1, 1 TSRMLS_CC);
+	new_class_entry->name = (char *)zend_new_interned_string(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant) + 1, 1 TSRMLS_CC);
 	new_class_entry->name_length = Z_STRLEN(class_name->u.constant);
 
 	zend_initialize_class_data(new_class_entry, 1 TSRMLS_CC);
@@ -4980,7 +4980,7 @@
 	ALLOC_ZVAL(property);
 	*property = value->u.constant;
 	
-	cname = zend_new_interned_string(var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, 0 TSRMLS_CC);
+	cname = (char *)(char *)(char *)(char *)(char *)(char *)(char *)(char *)(char *)zend_new_interned_string(var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, 0 TSRMLS_CC);
 
 	if (IS_INTERNED(cname)) {
 		result = zend_hash_quick_add(&CG(active_class_entry)->constants_table, cname, var_name->u.constant.value.str.len+1, INTERNED_HASH(cname), &property, sizeof(zval *), NULL);
@@ -6047,7 +6047,7 @@
 		}
 
 		if (CG(multibyte)) {
-			zend_encoding *new_encoding, *old_encoding;
+			const zend_encoding *new_encoding, *old_encoding;
 			zend_encoding_filter old_input_filter;
 
 			CG(encoding_declared) = 1;
@@ -6064,7 +6064,7 @@
 				/* need to re-scan if input filter changed */
 				if (old_input_filter != LANG_SCNG(input_filter) ||
 					 (old_input_filter && new_encoding != old_encoding)) {
-					zend_multibyte_yyinput_again(old_input_filter, old_encoding TSRMLS_CC);
+					zend_multibyte_yyinput_again(old_input_filter, (zend_encoding *)old_encoding TSRMLS_CC);
 				}
 			}
 		} else {
@@ -6305,7 +6305,7 @@
 {
 	zend_auto_global auto_global;
 
-	auto_global.name = zend_new_interned_string((char*)name, name_len + 1, 0 TSRMLS_CC);
+	auto_global.name = (char *)zend_new_interned_string((char*)name, name_len + 1, 0 TSRMLS_CC);
 	auto_global.name_len = name_len;
 	auto_global.auto_global_callback = auto_global_callback;
 	auto_global.jit = jit;
@@ -6600,7 +6600,7 @@
 		/* The form "use A\B" is eqivalent to "use A\B as B".
 		   So we extract the last part of compound name to use as a new_name */
 		name = &tmp;
-		p = zend_memrchr(Z_STRVAL_P(ns), '\\', Z_STRLEN_P(ns));
+		p = (char *)zend_memrchr(Z_STRVAL_P(ns), '\\', Z_STRLEN_P(ns));
 		if (p) {
 			ZVAL_STRING(name, p+1, 1);
 		} else {
Index: Zend/zend_objects.c
===================================================================
--- Zend/zend_objects.c	(revision 316302)
+++ Zend/zend_objects.c	(working copy)
@@ -104,7 +104,7 @@
 		if (!obj_bucket->bucket.obj.handlers) {
 			obj_bucket->bucket.obj.handlers = &std_object_handlers;
 		}
-		Z_OBJ_HT_P(obj) = obj_bucket->bucket.obj.handlers;
+		Z_OBJ_HT_P(obj) = (zend_object_handlers *)obj_bucket->bucket.obj.handlers;
 		zval_copy_ctor(obj);
 
 		/* Make sure that destructors are protected from previously thrown exceptions.
Index: Zend/zend_vm_def.h
===================================================================
--- Zend/zend_vm_def.h	(revision 316302)
+++ Zend/zend_vm_def.h	(working copy)
@@ -3168,7 +3168,7 @@
 	if (UNEXPECTED(param == NULL)) {
 		if (zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, NULL, opline->extended_value TSRMLS_CC)) {
 			char *space;
-			char *class_name;
+			const char *class_name;
 			zend_execute_data *ptr;
 
 			if (EG(active_op_array)->scope) {
Index: Zend/zend_hash.c
===================================================================
--- Zend/zend_hash.c	(revision 316302)
+++ Zend/zend_hash.c	(working copy)
@@ -1400,9 +1400,9 @@
 		} else {
 			p->h = h;
 			if (IS_INTERNED(str_index)) {
-				p->arKey = str_index;
+				p->arKey = (char *)str_index;
 			} else {
-				p->arKey = (char*)(p+1);
+				p->arKey = (char *)(p+1);
 				memcpy(p->arKey, str_index, str_length);
 			}
 		}
Index: Zend/zend_language_scanner.c
===================================================================
--- Zend/zend_language_scanner.c	(revision 316302)
+++ Zend/zend_language_scanner.c	(working copy)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Aug 18 01:37:48 2011 */
+/* Generated by re2c 0.13.5 on Wed Sep  7 16:04:43 2011 */
 #line 1 "Zend/zend_language_scanner.l"
 /*
    +----------------------------------------------------------------------+
@@ -1380,7 +1380,7 @@
 		yyleng = YYCURSOR - SCNG(yy_text);
 #line 1693 "Zend/zend_language_scanner.l"
 		{
-	YYCTYPE *bracket = zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
+	YYCTYPE *bracket = (unsigned char *)zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
 
 	if (bracket != SCNG(yy_text)) {
 		/* Handle previously scanned HTML, as possible <script> tags found are assumed to not be PHP's */
@@ -4278,8 +4278,8 @@
 		yyleng = YYCURSOR - SCNG(yy_text);
 #line 1617 "Zend/zend_language_scanner.l"
 		{
-	char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
 	char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
+	const char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
 	size_t len = 0;
 
 	if (class_name) {
@@ -4428,7 +4428,7 @@
 		yyleng = YYCURSOR - SCNG(yy_text);
 #line 1581 "Zend/zend_language_scanner.l"
 		{
-	char *trait_name = NULL;
+	const char *trait_name = NULL;
 	
 	if (CG(active_class_entry)
 		&& (ZEND_ACC_TRAIT == 
@@ -4478,7 +4478,7 @@
 		yyleng = YYCURSOR - SCNG(yy_text);
 #line 1554 "Zend/zend_language_scanner.l"
 		{
-	char *class_name = NULL;
+	const char *class_name = NULL;
 	
 	if (CG(active_class_entry)
 		&& (ZEND_ACC_TRAIT ==
Index: Zend/zend_language_scanner.l
===================================================================
--- Zend/zend_language_scanner.l	(revision 316302)
+++ Zend/zend_language_scanner.l	(working copy)
@@ -1552,7 +1552,7 @@
 }
 
 <ST_IN_SCRIPTING>"__CLASS__" {
-	char *class_name = NULL;
+	const char *class_name = NULL;
 	
 	if (CG(active_class_entry)
 		&& (ZEND_ACC_TRAIT ==
@@ -1579,7 +1579,7 @@
 }
 
 <ST_IN_SCRIPTING>"__TRAIT__" {
-	char *trait_name = NULL;
+	const char *trait_name = NULL;
 	
 	if (CG(active_class_entry)
 		&& (ZEND_ACC_TRAIT == 
@@ -1615,8 +1615,8 @@
 }
 
 <ST_IN_SCRIPTING>"__METHOD__" {
-	char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
 	char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
+	const char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
 	size_t len = 0;
 
 	if (class_name) {
@@ -1691,7 +1691,7 @@
 }
 
 <INITIAL>"<script"{WHITESPACE}+"language"{WHITESPACE}*"="{WHITESPACE}*("php"|"\"php\""|"'php'"){WHITESPACE}*">" {
-	YYCTYPE *bracket = zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
+	YYCTYPE *bracket = (unsigned char *)zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
 
 	if (bracket != SCNG(yy_text)) {
 		/* Handle previously scanned HTML, as possible <script> tags found are assumed to not be PHP's */
Index: Zend/zend_vm_execute.h
===================================================================
--- Zend/zend_vm_execute.h	(revision 316302)
+++ Zend/zend_vm_execute.h	(working copy)
@@ -762,7 +762,7 @@
 	if (UNEXPECTED(param == NULL)) {
 		if (zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, NULL, opline->extended_value TSRMLS_CC)) {
 			char *space;
-			char *class_name;
+			const char *class_name;
 			zend_execute_data *ptr;
 
 			if (EG(active_op_array)->scope) {
Index: Zend/zend_stream.c
===================================================================
--- Zend/zend_stream.c	(revision 316302)
+++ Zend/zend_stream.c	(working copy)
@@ -120,7 +120,7 @@
 	handle->type = ZEND_HANDLE_FP;
 	handle->opened_path = NULL;
 	handle->handle.fp = zend_fopen(filename, &handle->opened_path TSRMLS_CC);
-	handle->filename = filename;
+	handle->filename = (char *)filename;
 	handle->free_filename = 0;
 	memset(&handle->handle.stream.mmap, 0, sizeof(zend_mmap));
 	
Index: Zend/zend_API.c
===================================================================
--- Zend/zend_API.c	(revision 316302)
+++ Zend/zend_API.c	(working copy)
@@ -248,7 +248,7 @@
 ZEND_API int zend_get_object_classname(const zval *object, const char **class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */
 {
 	if (Z_OBJ_HT_P(object)->get_class_name == NULL ||
-		Z_OBJ_HT_P(object)->get_class_name(object, class_name, class_name_len, 0 TSRMLS_CC) != SUCCESS) {
+		Z_OBJ_HT_P(object)->get_class_name(object, (char **)class_name, class_name_len, 0 TSRMLS_CC) != SUCCESS) {
 		zend_class_entry *ce = Z_OBJCE_P(object);
 
 		*class_name = ce->name;
@@ -557,7 +557,7 @@
 					*p = *arg;
 				} else {
 					if (ce) {
-						return ce->name;
+						return (char *)ce->name;
 					} else {
 						return "object";
 					}
@@ -735,7 +735,7 @@
 				if (have_varargs) {
 					if (!quiet) {
 						zend_function *active_function = EG(current_execute_data)->function_state.function;
-						char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
+						const char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
 						zend_error(E_WARNING, "%s%s%s(): only one varargs specifier (* or +) is permitted",
 								class_name,
 								class_name[0] ? "::" : "",
@@ -755,7 +755,7 @@
 			default:
 				if (!quiet) {
 					zend_function *active_function = EG(current_execute_data)->function_state.function;
-					char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
+					const char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
 					zend_error(E_WARNING, "%s%s%s(): bad type specifier while parsing parameters",
 							class_name,
 							class_name[0] ? "::" : "",
@@ -778,7 +778,7 @@
 	if (num_args < min_num_args || (num_args > max_num_args && max_num_args > 0)) {
 		if (!quiet) {
 			zend_function *active_function = EG(current_execute_data)->function_state.function;
-			char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
+			const char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
 			zend_error(E_WARNING, "%s%s%s() expects %s %d parameter%s, %d given",
 					class_name,
 					class_name[0] ? "::" : "",
@@ -1926,7 +1926,7 @@
 	zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL, *__callstatic = NULL, *__tostring = NULL;
 	char *lowercase_name;
 	int fname_len;
-	const char *lc_class_name = NULL;
+	char *lc_class_name = NULL;
 	int class_name_len = 0;
 
 	if (type==MODULE_PERSISTENT) {
@@ -1943,7 +1943,7 @@
 
 	if (scope) {
 		class_name_len = strlen(scope->name);
-		if ((lc_class_name = zend_memrchr(scope->name, '\\', class_name_len))) {
+		if ((lc_class_name = (char *)zend_memrchr(scope->name, '\\', class_name_len))) {
 			++lc_class_name;
 			class_name_len -= (lc_class_name - scope->name);
 			lc_class_name = zend_str_tolower_dup(lc_class_name, class_name_len);
@@ -2025,7 +2025,7 @@
 			}
 		}
 		fname_len = strlen(ptr->fname);
-		lowercase_name = zend_new_interned_string(zend_str_tolower_dup(ptr->fname, fname_len), fname_len + 1, 1 TSRMLS_CC);
+		lowercase_name = (char *)zend_new_interned_string(zend_str_tolower_dup(ptr->fname, fname_len), fname_len + 1, 1 TSRMLS_CC);
 		if (IS_INTERNED(lowercase_name)) {
 			result = zend_hash_quick_add(target_function_table, lowercase_name, fname_len+1, INTERNED_HASH(lowercase_name), &function, sizeof(zend_function), (void**)&reg_function);
 		} else {
@@ -2394,7 +2394,7 @@
 	}
 
 	zend_str_tolower_copy(lowercase_name, orig_class_entry->name, class_entry->name_length);
-	lowercase_name = zend_new_interned_string(lowercase_name, class_entry->name_length + 1, 1 TSRMLS_CC);
+	lowercase_name = (char *)zend_new_interned_string(lowercase_name, class_entry->name_length + 1, 1 TSRMLS_CC);
 	if (IS_INTERNED(lowercase_name)) {
 		zend_hash_quick_update(CG(class_table), lowercase_name, class_entry->name_length+1, INTERNED_HASH(lowercase_name), &class_entry, sizeof(zend_class_entry *), NULL);
 	} else {
@@ -3362,7 +3362,7 @@
 			break;
 	}
 
-	interned_name = zend_new_interned_string(property_info.name, property_info.name_length+1, 0 TSRMLS_CC);
+	interned_name = (char *)zend_new_interned_string(property_info.name, property_info.name_length+1, 0 TSRMLS_CC);
 	if (interned_name != property_info.name) {
 		if (ce->type == ZEND_USER_CLASS) {
 			efree(property_info.name);
@@ -3580,7 +3580,7 @@
 	EG(scope) = scope;
 
 	if (!Z_OBJ_HT_P(object)->write_property) {
-		char *class_name;
+		const char *class_name;
 		zend_uint class_name_len;
 
 		zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
@@ -3783,7 +3783,7 @@
 	EG(scope) = scope;
 
 	if (!Z_OBJ_HT_P(object)->read_property) {
-		char *class_name;
+		const char *class_name;
 		zend_uint class_name_len;
 
 		zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
Index: Zend/zend_iterators.c
===================================================================
--- Zend/zend_iterators.c	(revision 316302)
+++ Zend/zend_iterators.c	(working copy)
@@ -52,7 +52,7 @@
 {
 	INIT_CLASS_ENTRY(zend_iterator_class_entry, "__iterator_wrapper", NULL);
 	if (!IS_INTERNED(zend_iterator_class_entry.name)) {
-		free(zend_iterator_class_entry.name);
+		free((char *)zend_iterator_class_entry.name);
 	}
 	zend_iterator_class_entry.name = "__iterator_wrapper";
 }
Index: Zend/zend_exceptions.c
===================================================================
--- Zend/zend_exceptions.c	(revision 316302)
+++ Zend/zend_exceptions.c	(working copy)
@@ -436,7 +436,7 @@
 
 			TRACE_APPEND_STR("Object(");
 
-			dup = zend_get_object_classname(*arg, &class_name, &class_name_len TSRMLS_CC);
+			dup = zend_get_object_classname(*arg, (const char **)&class_name, &class_name_len TSRMLS_CC);
 
 			TRACE_APPEND_STRL(class_name, class_name_len);
 			if(!dup) {
Index: Zend/zend_alloc.c
===================================================================
--- Zend/zend_alloc.c	(revision 316302)
+++ Zend/zend_alloc.c	(working copy)
@@ -460,7 +460,7 @@
 		sizeof(zend_mm_free_block*) * 2 - \
 		sizeof(zend_mm_small_free_block))
 
-#define ZEND_MM_REST_BLOCK ((zend_mm_free_block*)(zend_uintptr_t)(1))
+#define ZEND_MM_REST_BLOCK ((zend_mm_free_block**)(zend_uintptr_t)(1))
 
 #define ZEND_MM_MAX_REST_BLOCKS 16
 
Index: Zend/zend_execute_API.c
===================================================================
--- Zend/zend_execute_API.c	(revision 316302)
+++ Zend/zend_execute_API.c	(working copy)
@@ -358,7 +358,7 @@
 			if (space) {
 				*space = ce ? "::" : "";
 			}
-			return ce ? ce->name : "";
+			return ce ? (char *)ce->name : "";
 		}
 		default:
 			if (space) {
@@ -515,7 +515,7 @@
 		if (!zend_get_constant_ex(p->value.str.val, p->value.str.len, &const_value, scope, Z_REAL_TYPE_P(p) TSRMLS_CC)) {
 			char *actual = Z_STRVAL_P(p);
 
-			if ((colon = zend_memrchr(Z_STRVAL_P(p), ':', Z_STRLEN_P(p)))) {
+			if ((colon = (char*)zend_memrchr(Z_STRVAL_P(p), ':', Z_STRLEN_P(p)))) {
 				zend_error(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(p));
 				Z_STRLEN_P(p) -= ((colon - Z_STRVAL_P(p)) + 1);
 				if (inline_change) {
@@ -616,7 +616,7 @@
 			}
 			if (!zend_get_constant_ex(str_index, str_index_len - 3, &const_value, scope, str_index[str_index_len - 2] TSRMLS_CC)) {
 				char *actual, *save = str_index;
-				if ((colon = zend_memrchr(str_index, ':', str_index_len - 3))) {
+				if ((colon = (char *)zend_memrchr(str_index, ':', str_index_len - 3))) {
 					zend_error(E_ERROR, "Undefined class constant '%s'", str_index);
 					str_index_len -= ((colon - str_index) + 1);
 					str_index = colon;
Index: Zend/zend_opcode.c
===================================================================
--- Zend/zend_opcode.c	(revision 316302)
+++ Zend/zend_opcode.c	(working copy)
@@ -292,7 +292,7 @@
 			}
 			zend_hash_destroy(&ce->properties_info);
 			if (!IS_INTERNED(ce->name)) {
-				efree(ce->name);
+				efree((char *)ce->name);
 			}
 			zend_hash_destroy(&ce->function_table);
 			zend_hash_destroy(&ce->constants_table);
@@ -328,7 +328,7 @@
 			}
 			zend_hash_destroy(&ce->properties_info);
 			if (!IS_INTERNED(ce->name)) {
-				free(ce->name);
+				free((char *)ce->name);
 			}
 			zend_hash_destroy(&ce->function_table);
 			zend_hash_destroy(&ce->constants_table);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC