com php-src: Fix a number of format issues: Zend/zend_execute .c ext/dom/xml_common.h ext/gmp/gmp.c ext/pdo/pdo .c ext/pdo/pdo_stmt.c
ext/standard/password.c ext /standard/var_unserializer.c ext/standard/var_unseriali zer.re main/main.c

From: Date: Wed, 03 Sep 2014 13:57:28 +0000
Subject: com php-src: Fix a number of format issues: Zend/zend_execute .c ext/dom/xml_common.h ext/gmp/gmp.c ext/pdo/pdo .c ext/pdo/pdo_stmt.c
ext/standard/password.c ext /standard/var_unserializer.c ext/standard/var_unseriali zer.re main/main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81403@lists.php.net to get a copy of this message
Commit: 6cceb54c091fce4f429fa2f0995892a8870e02ae Author: Nikita Popov <nikic@php.net> Wed, 3 Sep 2014 15:57:28 +0200 Parents: 979058d4ffee024255dc12b8bc94df88235bf45d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6cceb54c091fce4f429fa2f0995892a8870e02ae Log: Fix a number of format issues Changed paths: M Zend/zend_execute.c M ext/dom/xml_common.h M ext/gmp/gmp.c M ext/pdo/pdo.c M ext/pdo/pdo_stmt.c M ext/standard/password.c M ext/standard/var_unserializer.c M ext/standard/var_unserializer.re M main/main.c Diff: diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index d981773..5cddebd 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1305,7 +1305,7 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z if (UNEXPECTED(offset < 0) || UNEXPECTED(Z_STRLEN_P(container) <= offset)) { if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Uninitialized string offset: %ld", offset); + zend_error(E_NOTICE, "Uninitialized string offset: %pd", offset); } ZVAL_EMPTY_STRING(result); } else { diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 49226c4..ed3d79b 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -68,7 +68,8 @@ PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj); #define NODE_GET_OBJ(__ptr, __id, __prtype, __intern) { \ __intern = Z_LIBXML_NODE_P(__id); \ if (__intern->node == NULL || !(__ptr = (__prtype)__intern->node->node)) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't fetch %s", __intern->std.ce->name);\ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't fetch %s", \ + __intern->std.ce->name->val);\ RETURN_NULL();\ } \ } diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 84f6bd4..3b582129 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1065,7 +1065,7 @@ int gmp_import_export_validate(zend_long size, zend_long options, int *order, in { if (size < 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, - "Word size must be positive, %ld given", size); + "Word size must be positive, %pd given", size); return FAILURE; } diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c index 936428a..88df420 100644 --- a/ext/pdo/pdo.c +++ b/ext/pdo/pdo.c @@ -179,7 +179,7 @@ static PHP_GINIT_FUNCTION(pdo) PDO_API int php_pdo_register_driver(pdo_driver_t *driver) /* {{{ */ { if (driver->api_version != PDO_DRIVER_API) { - zend_error(E_ERROR, "PDO: driver %s requires PDO API version %ld; this is PDO version %d", + zend_error(E_ERROR, "PDO: driver %s requires PDO API version %pd; this is PDO version %d", driver->driver_name, driver->api_version, PDO_DRIVER_API); return FAILURE; } diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index afbe068..dd8b01a 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2128,7 +2128,7 @@ static PHP_METHOD(PDOStatement, debugDumpParams) php_stream_printf(out TSRMLS_CC, "Key: Position #%pd:\n", num); } - php_stream_printf(out TSRMLS_CC, "paramno=%ld\nname=[%d] \"%.*s\"\nis_param=%d\nparam_type=%d\n", + php_stream_printf(out TSRMLS_CC, "paramno=%pd\nname=[%d] \"%.*s\"\nis_param=%d\nparam_type=%d\n", param->paramno, param->name? param->name->len : 0, param->name? param->name->len : 0, param->name ? param->name->val : "", param->is_param, diff --git a/ext/standard/password.c b/ext/standard/password.c index 4fc93c3..cda10cb 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -342,7 +342,7 @@ PHP_FUNCTION(password_hash) required_salt_len = 22; hash_format = emalloc(8); - sprintf(hash_format, "$2y$%02ld$", cost); + sprintf(hash_format, "$2y$%02ld$", (long) cost); hash_format_len = 7; } break; diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index 8d9899f..7e6789d 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -387,7 +387,7 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) (*p) += 2; if (datalen < 0 || (*p) + datalen >= max) { - zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %pd present", datalen, (zend_long)(max - (*p))); + zend_error(E_WARNING, "Insufficient data for unserializing - %pd required, %pd present", datalen, (zend_long)(max - (*p))); return 0; } diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 988666b..3916135 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -391,7 +391,7 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) (*p) += 2; if (datalen < 0 || (*p) + datalen >= max) { - zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %pd present", datalen, (zend_long)(max - (*p))); + zend_error(E_WARNING, "Insufficient data for unserializing - %pd required, %pd present", datalen, (zend_long)(max - (*p))); return 0; } diff --git a/main/main.c b/main/main.c index 5c4cc91..fde2902 100644 --- a/main/main.c +++ b/main/main.c @@ -1130,7 +1130,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ if (PG(display_errors) && ((module_initialized && !PG(during_request_startup)) || (PG(display_startup_errors)))) { if (PG(xmlrpc_errors)) { - php_printf("<?xml version=\"1.0\"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>%ld</int></value></member><member><name>faultString</name><value><string>%s:%s in %s on line %d</string></value></member></struct></value></fault></methodResponse>", PG(xmlrpc_error_number), error_type_str, buffer, error_filename, error_lineno); + php_printf("<?xml version=\"1.0\"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>%pd</int></value></member><member><name>faultString</name><value><string>%s:%s in %s on line %d</string></value></member></struct></value></fault></methodResponse>", PG(xmlrpc_error_number), error_type_str, buffer, error_filename, error_lineno); } else { char *prepend_string = INI_STR("error_prepend_string"); char *append_string = INI_STR("error_append_string");

« previous php.cvs (#81403) next »