summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-09-03 15:57:28 +0200
committerNikita Popov <nikic@php.net>2014-09-03 15:57:28 +0200
commit6cceb54c091fce4f429fa2f0995892a8870e02ae (patch)
treed79d35124300b7cf2e0e0110c9ab7cbce88bfeea
parent979058d4ffee024255dc12b8bc94df88235bf45d (diff)
downloadphp-git-6cceb54c091fce4f429fa2f0995892a8870e02ae.tar.gz
Fix a number of format issues
-rw-r--r--Zend/zend_execute.c2
-rw-r--r--ext/dom/xml_common.h3
-rw-r--r--ext/gmp/gmp.c2
-rw-r--r--ext/pdo/pdo.c2
-rw-r--r--ext/pdo/pdo_stmt.c2
-rw-r--r--ext/standard/password.c2
-rw-r--r--ext/standard/var_unserializer.c2
-rw-r--r--ext/standard/var_unserializer.re2
-rw-r--r--main/main.c2
9 files changed, 10 insertions, 9 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index d981773b45..5cddebd2a4 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 49226c459c..ed3d79b8a8 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 84f6bd4130..3b58212902 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 936428ad7b..88df420c37 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 afbe068e3f..dd8b01a5b4 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 4fc93c3416..cda10cbac0 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 8d9899f81f..7e6789daaa 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 988666b2de..39161353f8 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 5c4cc91e44..fde2902d64 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");