mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-13 22:50:19 +02:00
Problem: ptr/ref parameters and local variables are non-const but never modified
Solution: add const
This commit is contained in:
@@ -173,7 +173,7 @@ int zmq::session_base_t::push_msg (msg_t *msg_)
|
||||
&& !msg_->is_cancel ())
|
||||
return 0;
|
||||
if (_pipe && _pipe->write (msg_)) {
|
||||
int rc = msg_->init ();
|
||||
const int rc = msg_->init ();
|
||||
errno_assert (rc == 0);
|
||||
return 0;
|
||||
}
|
||||
@@ -404,7 +404,7 @@ void zmq::session_base_t::process_attach (i_engine *engine_)
|
||||
int hwms[2] = {conflate ? -1 : options.rcvhwm,
|
||||
conflate ? -1 : options.sndhwm};
|
||||
bool conflates[2] = {conflate, conflate};
|
||||
int rc = pipepair (parents, pipes, hwms, conflates);
|
||||
const int rc = pipepair (parents, pipes, hwms, conflates);
|
||||
errno_assert (rc == 0);
|
||||
|
||||
// Plug the local end of the pipe.
|
||||
|
Reference in New Issue
Block a user