summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_shared_alloc.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-06-21 16:00:37 +0300
committerDmitry Stogov <dmitry@zend.com>2016-06-21 16:00:37 +0300
commit16160386982a86e6ec7969c6c89707d38228f19e (patch)
tree47052539a23ab7d6d2cf79392dd1e47de67bb2f1 /ext/opcache/zend_shared_alloc.c
parent67e23f4be3c01a389043ee97b98d6bcc703d3557 (diff)
downloadphp-git-16160386982a86e6ec7969c6c89707d38228f19e.tar.gz
Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings. Fixed most incorrect use cases of format specifiers.
Diffstat (limited to 'ext/opcache/zend_shared_alloc.c')
-rw-r--r--ext/opcache/zend_shared_alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index ff42c4cf0b..28cdc44097 100644
--- a/ext/opcache/zend_shared_alloc.c
+++ b/ext/opcache/zend_shared_alloc.c
@@ -99,7 +99,7 @@ void zend_shared_alloc_create_lock(char *lockfile_path)
static void no_memory_bailout(size_t allocate_size, char *error)
{
- zend_accel_error(ACCEL_LOG_FATAL, "Unable to allocate shared memory segment of %ld bytes: %s: %s (%d)", allocate_size, error?error:"unknown", strerror(errno), errno );
+ zend_accel_error(ACCEL_LOG_FATAL, "Unable to allocate shared memory segment of %zu bytes: %s: %s (%d)", allocate_size, error?error:"unknown", strerror(errno), errno );
}
static void copy_shared_segments(void *to, void *from, int count, int size)
@@ -299,7 +299,7 @@ static size_t zend_shared_alloc_get_largest_free_block(void)
#define MIN_FREE_MEMORY 64*1024
#define SHARED_ALLOC_FAILED() do { \
- zend_accel_error(ACCEL_LOG_WARNING, "Not enough free shared space to allocate %pd bytes (%pd bytes free)", (zend_long)size, (zend_long)ZSMMG(shared_free)); \
+ zend_accel_error(ACCEL_LOG_WARNING, "Not enough free shared space to allocate %zd bytes (%zd bytes free)", (size_t)size, (size_t)ZSMMG(shared_free)); \
if (zend_shared_alloc_get_largest_free_block() < MIN_FREE_MEMORY) { \
ZSMMG(memory_exhausted) = 1; \
} \