summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2013-08-14 11:42:39 +0800
committerXinchen Hui <laruence@php.net>2013-08-14 11:42:39 +0800
commitf4dc2240a048050a87a6e3e31573f13a2256cf2e (patch)
treead0239ff24b11e7a4d88e816b963aaae4a73256f /Zend
parent72aacbf735c59d4414b6111284a6232befd093fc (diff)
downloadphp-git-f4dc2240a048050a87a6e3e31573f13a2256cf2e.tar.gz
Fixed #65431 (Discarded qualifiers from pointer target warnings when using --enable-dtrace) by Sixd
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend.c2
-rw-r--r--Zend/zend_dtrace.c22
-rw-r--r--Zend/zend_vm_def.h2
-rw-r--r--Zend/zend_vm_execute.h2
4 files changed, 14 insertions, 14 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index fc443d95b9..85603082c0 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 5b2d0d2dfe..8846893125 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 09d0b217a6..f6c6e6ac58 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 4917cb670a..64d4320f9a 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 */