Problem: ptr/ref parameters and local variables are non-const but never modified

Solution: add const
This commit is contained in:
Simon Giesecke
2019-12-25 13:51:21 +01:00
parent 759fed8e7e
commit 41e3f14d6a
71 changed files with 319 additions and 312 deletions

View File

@@ -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.