mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 16:06:09 +00:00
Merge pull request #3570 from bluca/static_analysis
Static analysis warnings
This commit is contained in:
commit
02f7dca678
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
cd ../../
|
||||
|
||||
|
@ -396,8 +396,8 @@ void zmq::udp_engine_t::out_event ()
|
||||
if (rc == 0) {
|
||||
msg_t body_msg;
|
||||
rc = _session->pull_msg (&body_msg);
|
||||
// TODO rc is not checked here. We seem to assume rc == 0. An
|
||||
// assertion should be added.
|
||||
// If there's a group, there should also be a body
|
||||
errno_assert (rc == 0);
|
||||
|
||||
const size_t group_size = group_msg.size ();
|
||||
const size_t body_size = body_msg.size ();
|
||||
@ -412,7 +412,7 @@ void zmq::udp_engine_t::out_event ()
|
||||
rc = group_msg.close ();
|
||||
errno_assert (rc == 0);
|
||||
|
||||
body_msg.close ();
|
||||
rc = body_msg.close ();
|
||||
errno_assert (rc == 0);
|
||||
|
||||
return;
|
||||
|
@ -339,7 +339,7 @@ void expect_monitor_event_v2 (void *monitor_,
|
||||
}
|
||||
if (expected_remote_address_
|
||||
&& 0 != strcmp (remote_address, expected_remote_address_)) {
|
||||
pos += snprintf (pos, sizeof buf - (pos - buf),
|
||||
snprintf (pos, sizeof buf - (pos - buf),
|
||||
"Expected remote address %s, but received %s\n",
|
||||
expected_remote_address_, remote_address);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user