diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2017-11-16 21:26:33 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-11-16 21:26:33 +0100 |
commit | 95e9cc28717c4051d552d6da2ef120f203bc2dd3 (patch) | |
tree | 5c80ce3452b13b0e4dea1d3c782ea4943fe0a8b6 /ext | |
parent | 9379b319b0e9922c097f0b41dff83007ba4e7b3c (diff) | |
download | php-git-95e9cc28717c4051d552d6da2ef120f203bc2dd3.tar.gz |
Backport some printf() fixes to 7.2
Diffstat (limited to 'ext')
-rw-r--r-- | ext/opcache/ZendAccelerator.c | 2 | ||||
-rw-r--r-- | ext/phar/phar_object.c | 4 | ||||
-rw-r--r-- | ext/standard/exec.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 6d18ea1bd7..d9d5940574 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2185,7 +2185,7 @@ static void accel_activate(void) if (ZCG(counted)) { #ifdef ZTS - zend_accel_error(ACCEL_LOG_WARNING, "Stuck count for thread id %d", tsrm_thread_id()); + zend_accel_error(ACCEL_LOG_WARNING, "Stuck count for thread id %lu", (unsigned long) tsrm_thread_id()); #else zend_accel_error(ACCEL_LOG_WARNING, "Stuck count for pid %d", getpid()); #endif diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index c3102039f0..876d5da83d 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1481,7 +1481,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ if (ZEND_SIZE_T_INT_OVFL(Z_STRLEN(key))) { zval_dtor(&key); - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (too long)", ZSTR_VAL(ce->name)); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (too long)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1615,7 +1615,7 @@ phar_spl_fileinfo: if (ZEND_SIZE_T_INT_OVFL(Z_STRLEN(key))) { zval_dtor(&key); - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (too long)", ZSTR_VAL(ce->name)); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (too long)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 1e70021674..4076c5af2b 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -295,7 +295,7 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str) /* max command line length - two single quotes - \0 byte length */ if (l > cmd_max_len - 2 - 1) { - php_error_docref(NULL, E_ERROR, "Command exceeds the allowed length of %d bytes", cmd_max_len); + php_error_docref(NULL, E_ERROR, "Command exceeds the allowed length of %zu bytes", cmd_max_len); return ZSTR_EMPTY_ALLOC(); } @@ -371,7 +371,7 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str) ZSTR_VAL(cmd)[y] = '\0'; if (y > cmd_max_len + 1) { - php_error_docref(NULL, E_ERROR, "Escaped command exceeds the allowed length of %d bytes", cmd_max_len); + php_error_docref(NULL, E_ERROR, "Escaped command exceeds the allowed length of %zu bytes", cmd_max_len); zend_string_release(cmd); return ZSTR_EMPTY_ALLOC(); } @@ -399,7 +399,7 @@ PHPAPI zend_string *php_escape_shell_arg(char *str) /* max command line length - two single quotes - \0 byte length */ if (l > cmd_max_len - 2 - 1) { - php_error_docref(NULL, E_ERROR, "Argument exceeds the allowed length of %d bytes", cmd_max_len); + php_error_docref(NULL, E_ERROR, "Argument exceeds the allowed length of %zu bytes", cmd_max_len); return ZSTR_EMPTY_ALLOC(); } @@ -458,7 +458,7 @@ PHPAPI zend_string *php_escape_shell_arg(char *str) ZSTR_VAL(cmd)[y] = '\0'; if (y > cmd_max_len + 1) { - php_error_docref(NULL, E_ERROR, "Escaped argument exceeds the allowed length of %d bytes", cmd_max_len); + php_error_docref(NULL, E_ERROR, "Escaped argument exceeds the allowed length of %zu bytes", cmd_max_len); zend_string_release(cmd); return ZSTR_EMPTY_ALLOC(); } |