From: Gustavo André dos Santos Lopes Date: Sun, 4 Mar 2012 19:30:01 +0000 (+0000) Subject: - size_t may be shorter than long and definitely is not signed. Note that the X-Git-Tag: PHP-5.4.1-RC1~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32c5643f6b0ba46fdbdbf58a8def23a8403b3c0b;p=php - size_t may be shorter than long and definitely is not signed. Note that the z modifier was only added in C99, so we can't use it. --- diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index f23137f5a7..7c3a553102 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -510,7 +510,9 @@ static inline int parse_unix_address(php_stream_xport_param *xparam, struct sock * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "socket path exceeded the maximum allowed length of %lu bytes " + "and was truncated", (unsigned long)sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen);