]> granicus.if.org Git - php/commitdiff
Fixed #65431 (Discarded qualifiers from pointer target warnings when using --enable...
authorXinchen Hui <laruence@php.net>
Wed, 14 Aug 2013 03:42:39 +0000 (11:42 +0800)
committerXinchen Hui <laruence@php.net>
Wed, 14 Aug 2013 03:42:39 +0000 (11:42 +0800)
Zend/zend.c
Zend/zend_dtrace.c
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
main/main.c

index fc443d95b919b7ef00a8402090829a6706425a98..85603082c0169bd66668a1225cff1a85263d4c7f 100644 (file)
@@ -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 */
index 5b2d0d2dfed21b276d6cd39c964ac38893d8508a..88468931252f778258b43c3e908144e60d223b99 100644 (file)
@@ -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);
        }
 }
 
index 09d0b217a67d23573a721eff001c08ffa0529347..f6c6e6ac585c095bb71f7dc5a2ead2f0d6fde3bc 100644 (file)
@@ -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 */
 
index 4917cb670a326773b6cad12613d9c8c5333fe882..64d4320f9afef801232ea2a640824949bdc82353 100644 (file)
@@ -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 */
 
index 2821dfcdca29ab98eef14b6f3ee413d5b6d00f2a..b639ab165836ba4723c449cdf9508ed78eaf256a 100644 (file)
@@ -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 */
 }
 /* }}} */