Skip to content

Commit

Permalink
Merge pull request #357 from gummif/gfa/nodiscard-recv
Browse files Browse the repository at this point in the history
Problem: recv return value should not be ignored
  • Loading branch information
sigiesec authored Nov 4, 2019
2 parents fdb2f13 + 4bc232c commit e67fa0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zmq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ class socket_base
}

#ifdef ZMQ_CPP11
detail::recv_buffer_result_t recv(mutable_buffer buf,
ZMQ_NODISCARD detail::recv_buffer_result_t recv(mutable_buffer buf,
recv_flags flags = recv_flags::none)
{
const int nbytes =
Expand All @@ -1362,7 +1362,7 @@ class socket_base
throw error_t();
}

detail::recv_result_t recv(message_t &msg, recv_flags flags = recv_flags::none)
ZMQ_NODISCARD detail::recv_result_t recv(message_t &msg, recv_flags flags = recv_flags::none)
{
const int nbytes = zmq_msg_recv(msg.handle(), _handle, static_cast<int>(flags));
if (nbytes >= 0) {
Expand Down

0 comments on commit e67fa0e

Please sign in to comment.