diff --git a/net/usrsock/usrsock_bind.c b/net/usrsock/usrsock_bind.c index f6b2869384..6a15930b5d 100644 --- a/net/usrsock/usrsock_bind.c +++ b/net/usrsock/usrsock_bind.c @@ -154,7 +154,7 @@ int usrsock_bind(FAR struct socket *psock, { }; - ssize_t ret; + int ret; DEBUGASSERT(conn); diff --git a/net/usrsock/usrsock_dev.c b/net/usrsock/usrsock_dev.c index ad050ee32a..443386decf 100644 --- a/net/usrsock/usrsock_dev.c +++ b/net/usrsock/usrsock_dev.c @@ -485,7 +485,7 @@ static ssize_t usrsockdev_handle_event(FAR struct usrsockdev_s *dev, if (len < sizeof(*hdr)) { - nwarn("message too short, %d < %d.\n", len, sizeof(*hdr)); + nwarn("message too short, %zu < %zu.\n", len, sizeof(*hdr)); return -EINVAL; } @@ -654,7 +654,7 @@ usrsockdev_handle_datareq_response(FAR struct usrsockdev_s *dev, if (conn->resp.datain.iov[iovpos].iov_len < datahdr->valuelen) { - nwarn("%dth buffer not large enough (need: %d, have: %d).\n", + nwarn("%dth buffer not large enough (need: %d, have: %zu).\n", iovpos, datahdr->valuelen, conn->resp.datain.iov[iovpos].iov_len); @@ -676,7 +676,7 @@ usrsockdev_handle_datareq_response(FAR struct usrsockdev_s *dev, if (conn->resp.datain.iov[iovpos].iov_len < hdr->result) { nwarn("%dth buffer not large enough " - "(need: %" PRId32 ", have: %d).\n", + "(need: %" PRId32 ", have: %zu).\n", iovpos, hdr->result, conn->resp.datain.iov[iovpos].iov_len); @@ -742,7 +742,7 @@ static ssize_t usrsockdev_handle_req_response(FAR struct usrsockdev_s *dev, if (len < hdrlen) { - nwarn("message too short, %d < %d.\n", len, hdrlen); + nwarn("message too short, %zu < %u.\n", len, hdrlen); return -EINVAL; } @@ -855,7 +855,7 @@ static ssize_t usrsockdev_write(FAR struct file *filep, if (len < sizeof(struct usrsock_message_common_s)) { - nwarn("message too short, %d < %d.\n", len, + nwarn("message too short, %zu < %zu.\n", len, sizeof(struct usrsock_message_common_s)); ret = -EINVAL; diff --git a/net/usrsock/usrsock_getpeername.c b/net/usrsock/usrsock_getpeername.c index 7cc01bd171..3fafe929cd 100644 --- a/net/usrsock/usrsock_getpeername.c +++ b/net/usrsock/usrsock_getpeername.c @@ -162,8 +162,8 @@ int usrsock_getpeername(FAR struct socket *psock, }; struct iovec inbufs[1]; - ssize_t ret; socklen_t outaddrlen = 0; + int ret; net_lock(); diff --git a/net/usrsock/usrsock_getsockname.c b/net/usrsock/usrsock_getsockname.c index 1f61d7ba94..10f3f65f99 100644 --- a/net/usrsock/usrsock_getsockname.c +++ b/net/usrsock/usrsock_getsockname.c @@ -162,8 +162,8 @@ int usrsock_getsockname(FAR struct socket *psock, }; struct iovec inbufs[1]; - ssize_t ret; socklen_t outaddrlen = 0; + int ret; net_lock(); diff --git a/net/usrsock/usrsock_getsockopt.c b/net/usrsock/usrsock_getsockopt.c index 5126ca8011..3e23efeccf 100644 --- a/net/usrsock/usrsock_getsockopt.c +++ b/net/usrsock/usrsock_getsockopt.c @@ -178,7 +178,7 @@ int usrsock_getsockopt(FAR struct usrsock_conn_s *conn, }; struct iovec inbufs[1]; - ssize_t ret; + int ret; net_lock(); diff --git a/net/usrsock/usrsock_recvmsg.c b/net/usrsock/usrsock_recvmsg.c index d865742807..980e349330 100644 --- a/net/usrsock/usrsock_recvmsg.c +++ b/net/usrsock/usrsock_recvmsg.c @@ -318,7 +318,7 @@ ssize_t usrsock_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg, USRSOCK_EVENT_REMOTE_CLOSED); if (ret < 0) { - nwarn("usrsock_setup_request_callback failed: %d\n", ret); + nwarn("usrsock_setup_request_callback failed: %zd\n", ret); goto errout_unlock; } @@ -340,7 +340,7 @@ ssize_t usrsock_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg, } else { - nerr("net_timedwait errno: %d\n", ret); + nerr("net_timedwait errno: %zd\n", ret); DEBUGASSERT(false); } } @@ -381,7 +381,7 @@ ssize_t usrsock_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg, USRSOCK_EVENT_ABORT | USRSOCK_EVENT_REQ_COMPLETE); if (ret < 0) { - nwarn("usrsock_setup_request_callback failed: %d\n", ret); + nwarn("usrsock_setup_request_callback failed: %zd\n", ret); goto errout_unlock; } diff --git a/net/usrsock/usrsock_sendmsg.c b/net/usrsock/usrsock_sendmsg.c index 8d9245a160..332817e38a 100644 --- a/net/usrsock/usrsock_sendmsg.c +++ b/net/usrsock/usrsock_sendmsg.c @@ -299,7 +299,7 @@ ssize_t usrsock_sendmsg(FAR struct socket *psock, USRSOCK_EVENT_REMOTE_CLOSED); if (ret < 0) { - nwarn("usrsock_setup_request_callback failed: %d\n", ret); + nwarn("usrsock_setup_request_callback failed: %zd\n", ret); goto errout_unlock; } @@ -321,7 +321,7 @@ ssize_t usrsock_sendmsg(FAR struct socket *psock, } else { - nerr("net_timedwait errno: %d\n", ret); + nerr("net_timedwait errno: %zd\n", ret); DEBUGASSERT(false); } } @@ -361,7 +361,7 @@ ssize_t usrsock_sendmsg(FAR struct socket *psock, USRSOCK_EVENT_REQ_COMPLETE); if (ret < 0) { - nwarn("usrsock_setup_request_callback failed: %d\n", ret); + nwarn("usrsock_setup_request_callback failed: %zd\n", ret); goto errout_unlock; } diff --git a/net/usrsock/usrsock_setsockopt.c b/net/usrsock/usrsock_setsockopt.c index dad69633ba..38788c5e7c 100644 --- a/net/usrsock/usrsock_setsockopt.c +++ b/net/usrsock/usrsock_setsockopt.c @@ -166,7 +166,7 @@ int usrsock_setsockopt(FAR struct usrsock_conn_s *conn, { }; - ssize_t ret; + int ret; DEBUGASSERT(conn);