Skip to content

Commit

Permalink
fix [-Wformat=]
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet authored and bluca committed Mar 6, 2020
1 parent 25aa669 commit efc0c6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions zmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ php_zmq_context *php_zmq_context_get(zend_long io_threads, zend_bool is_persiste

if (is_persistent) {
zend_resource *le_p = NULL;
plist_key = strpprintf(0, "zmq_context=[%ld]", io_threads);
plist_key = strpprintf(0, "zmq_context=[%ld]", (long)io_threads);

if ((le_p = zend_hash_find_ptr(&EG(persistent_list), plist_key)) != NULL) {
if (le_p->type == php_zmq_context_list_entry()) {
Expand Down Expand Up @@ -523,7 +523,7 @@ php_zmq_socket *php_zmq_socket_new(php_zmq_context *context, zend_long type, zen
static
zend_string *php_zmq_socket_plist_key(zend_long type, zend_string *persistent_id, zend_bool use_shared_ctx)
{
return strpprintf(0, "zmq_socket:[%ld]-[%s]-[%d]", type, persistent_id->val, use_shared_ctx);
return strpprintf(0, "zmq_socket:[%ld]-[%s]-[%d]", (long)type, persistent_id->val, use_shared_ctx);
}

static
Expand Down
4 changes: 2 additions & 2 deletions zmq_sockopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ PHP_METHOD(zmqsocket, getsockopt)
# endif /* ZMQ_LAST_ENDPOINT */

default:
zend_throw_exception_ex(php_zmq_socket_exception_sc_entry_get (), PHP_ZMQ_INTERNAL_ERROR, "Unknown option key %ld", key);
zend_throw_exception_ex(php_zmq_socket_exception_sc_entry_get (), PHP_ZMQ_INTERNAL_ERROR, "Unknown option key %ld", (long)key);
return;
}

Expand Down Expand Up @@ -2196,7 +2196,7 @@ PHP_METHOD(zmqsocket, setsockopt)


default:
zend_throw_exception_ex(php_zmq_socket_exception_sc_entry_get (), PHP_ZMQ_INTERNAL_ERROR, "Unknown option key %ld", key);
zend_throw_exception_ex(php_zmq_socket_exception_sc_entry_get (), PHP_ZMQ_INTERNAL_ERROR, "Unknown option key %ld", (long)key);
return;
}
ZMQ_RETURN_THIS;
Expand Down

0 comments on commit efc0c6c

Please sign in to comment.