php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch dtrace_php55.patch for Compile Warning Bug #65431Patch version 2013-08-13 20:36 UTC Return to Bug #65431 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: sixd@php.netdiff --git a/Zend/zend.c b/Zend/zend.c index aad6165..89649bf 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1098,7 +1098,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 165172a..a07edd6 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_ex(zend_execute_data *execute_data 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_ex(zend_execute_data *execute_data 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_ex(execute_data 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, zend_fcall_info *fci, 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, fci, 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 c3b6ed6..ada20ca 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3010,7 +3010,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 78d6e92..a80d9a4 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -7121,7 +7121,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 90474cd..e3b0e43 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 */ } /* }}} */ |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Tue Oct 08 09:01:27 2024 UTC |