php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65431
Patch zend_exceptions.c.patch revision 2013-08-14 18:39 UTC by sixd@php.net
Patch dtrace_master.patch revision 2013-08-13 20:36 UTC by sixd@php.net
Patch dtrace_php55.patch revision 2013-08-13 20:36 UTC by sixd@php.net
Patch dtrace_php54.patch revision 2013-08-13 20:35 UTC by sixd@php.net
Patch dtrace_casts_2.patch revision 2013-08-13 03:16 UTC by laruence@php.net
Patch dtrace_casts.patch revision 2013-08-09 22:32 UTC by sixd

Patch dtrace_php54.patch for Compile Warning Bug #65431

Patch version 2013-08-13 20:35 UTC

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

Obsolete patches:

Patch Revisions:

Developer: sixd@php.net

diff --git a/Zend/zend.c b/Zend/zend.c
index fc443d9..8560308 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1097,7 +1097,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
 	if(DTRACE_ERROR_ENABLED()) {
 		char *dtrace_error_buffer;
 		zend_vspprintf(&dtrace_error_buffer, 0, format, args);
-		DTRACE_ERROR(dtrace_error_buffer, error_filename, error_lineno);
+		DTRACE_ERROR(dtrace_error_buffer, (char *)error_filename, error_lineno);
 		efree(dtrace_error_buffer);
 	}
 #endif /* HAVE_DTRACE */
diff --git a/Zend/zend_dtrace.c b/Zend/zend_dtrace.c
index 5b2d0d2..8846893 100644
--- a/Zend/zend_dtrace.c
+++ b/Zend/zend_dtrace.c
@@ -24,7 +24,7 @@
 
 #ifdef HAVE_DTRACE
 /* PHP DTrace probes {{{ */
-static inline char *dtrace_get_executed_filename(TSRMLS_D)
+static inline const char *dtrace_get_executed_filename(TSRMLS_D)
 {
 	if (EG(current_execute_data) && EG(current_execute_data)->op_array) {
 		return EG(current_execute_data)->op_array->filename;
@@ -36,9 +36,9 @@ static inline char *dtrace_get_executed_filename(TSRMLS_D)
 ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC)
 {
 	zend_op_array *res;
-	DTRACE_COMPILE_FILE_ENTRY(file_handle->opened_path, file_handle->filename);
+	DTRACE_COMPILE_FILE_ENTRY(file_handle->opened_path, (char *)file_handle->filename);
 	res = compile_file(file_handle, type TSRMLS_CC);
-	DTRACE_COMPILE_FILE_RETURN(file_handle->opened_path, file_handle->filename);
+	DTRACE_COMPILE_FILE_RETURN(file_handle->opened_path, (char *)file_handle->filename);
 
 	return res;
 }
@@ -47,7 +47,7 @@ ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int t
 ZEND_API void dtrace_execute(zend_op_array *op_array TSRMLS_DC)
 {
 	int lineno;
-	char *scope, *filename, *funcname, *classname;
+	const char *scope, *filename, *funcname, *classname;
 	scope = filename = funcname = classname = NULL;
 
 	/* we need filename and lineno for both execute and function probes */
@@ -65,41 +65,41 @@ ZEND_API void dtrace_execute(zend_op_array *op_array TSRMLS_DC)
 	}
 
 	if (DTRACE_EXECUTE_ENTRY_ENABLED()) {
-		DTRACE_EXECUTE_ENTRY(filename, lineno);
+		DTRACE_EXECUTE_ENTRY((char *)filename, lineno);
 	}
 
 	if (DTRACE_FUNCTION_ENTRY_ENABLED() && funcname != NULL) {
-		DTRACE_FUNCTION_ENTRY(funcname, filename, lineno, classname, scope);
+		DTRACE_FUNCTION_ENTRY((char *)funcname, (char *)filename, lineno, (char *)classname, (char *)scope);
 	}
 
 	execute(op_array TSRMLS_CC);
 
 	if (DTRACE_FUNCTION_RETURN_ENABLED() && funcname != NULL) {
-		DTRACE_FUNCTION_RETURN(funcname, filename, lineno, classname, scope);
+		DTRACE_FUNCTION_RETURN((char *)funcname, (char *)filename, lineno, (char *)classname, (char *)scope);
 	}
 
 	if (DTRACE_EXECUTE_RETURN_ENABLED()) {
-		DTRACE_EXECUTE_RETURN(filename, lineno);
+		DTRACE_EXECUTE_RETURN((char *)filename, lineno);
 	}
 }
 
 ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC)
 {
 	int lineno;
-	char *filename;
+	const char *filename;
 	if (DTRACE_EXECUTE_ENTRY_ENABLED() || DTRACE_EXECUTE_RETURN_ENABLED()) {
 		filename = dtrace_get_executed_filename(TSRMLS_C);
 		lineno = zend_get_executed_lineno(TSRMLS_C);
 	}
 
 	if (DTRACE_EXECUTE_ENTRY_ENABLED()) {
-		DTRACE_EXECUTE_ENTRY(filename, lineno);
+		DTRACE_EXECUTE_ENTRY((char *)filename, lineno);
 	}
 
 	execute_internal(execute_data_ptr, return_value_used TSRMLS_CC);
 
 	if (DTRACE_EXECUTE_RETURN_ENABLED()) {
-		DTRACE_EXECUTE_RETURN(filename, lineno);
+		DTRACE_EXECUTE_RETURN((char *)filename, lineno);
 	}
 }
 
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 09d0b21..f6c6e6a 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2984,7 +2984,7 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
 
 #ifdef HAVE_DTRACE
 	if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
-		DTRACE_EXCEPTION_CAUGHT(ce->name);
+		DTRACE_EXCEPTION_CAUGHT((char *)ce->name);
 	}
 #endif /* HAVE_DTRACE */
 
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 4917cb6..64d4320 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -6279,7 +6279,7 @@ static int ZEND_FASTCALL  ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_A
 
 #ifdef HAVE_DTRACE
 	if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
-		DTRACE_EXCEPTION_CAUGHT(ce->name);
+		DTRACE_EXCEPTION_CAUGHT((char *)ce->name);
 	}
 #endif /* HAVE_DTRACE */
 
diff --git a/main/main.c b/main/main.c
index 2821dfc..b639ab1 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1526,7 +1526,7 @@ int php_request_startup(TSRMLS_D)
 	int retval = SUCCESS;
 
 #ifdef HAVE_DTRACE
-	DTRACE_REQUEST_STARTUP(SAFE_FILENAME(SG(request_info).path_translated), SAFE_FILENAME(SG(request_info).request_uri), SAFE_FILENAME(SG(request_info).request_method));
+	DTRACE_REQUEST_STARTUP(SAFE_FILENAME(SG(request_info).path_translated), SAFE_FILENAME(SG(request_info).request_uri), (char *)SAFE_FILENAME(SG(request_info).request_method));
 #endif /* HAVE_DTRACE */
 
 #ifdef PHP_WIN32
@@ -1836,7 +1836,7 @@ void php_request_shutdown(void *dummy)
 #endif
 
 #ifdef HAVE_DTRACE
-	DTRACE_REQUEST_SHUTDOWN(SAFE_FILENAME(SG(request_info).path_translated), SAFE_FILENAME(SG(request_info).request_uri), SAFE_FILENAME(SG(request_info).request_method));
+	DTRACE_REQUEST_SHUTDOWN(SAFE_FILENAME(SG(request_info).path_translated), SAFE_FILENAME(SG(request_info).request_uri), (char *)SAFE_FILENAME(SG(request_info).request_method));
 #endif /* HAVE_DTRACE */
 }
 /* }}} */
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 23:05:52 2022 UTC