Problem: local functions not declared static

Solution: add static
This commit is contained in:
Simon Giesecke
2019-12-23 13:39:40 +01:00
parent fa804c7783
commit 14ab794671
4 changed files with 20 additions and 21 deletions

View File

@@ -89,9 +89,8 @@ typedef struct
// Utility functions
int capture (class zmq::socket_base_t *capture_,
zmq::msg_t *msg_,
int more_ = 0)
static int
capture (class zmq::socket_base_t *capture_, zmq::msg_t *msg_, int more_ = 0)
{
// Copy message to capture socket if any
if (capture_) {
@@ -109,12 +108,12 @@ int capture (class zmq::socket_base_t *capture_,
return 0;
}
int forward (class zmq::socket_base_t *from_,
zmq_socket_stats_t *from_stats_,
class zmq::socket_base_t *to_,
zmq_socket_stats_t *to_stats_,
class zmq::socket_base_t *capture_,
zmq::msg_t *msg_)
static int forward (class zmq::socket_base_t *from_,
zmq_socket_stats_t *from_stats_,
class zmq::socket_base_t *to_,
zmq_socket_stats_t *to_stats_,
class zmq::socket_base_t *capture_,
zmq::msg_t *msg_)
{
// Forward a burst of messages
for (unsigned int i = 0; i < zmq::proxy_burst_size; i++) {
@@ -184,9 +183,9 @@ static int loop_and_send_multipart_stat (zmq::socket_base_t *control_,
return rc;
}
int reply_stats (class zmq::socket_base_t *control_,
zmq_socket_stats_t *frontend_stats_,
zmq_socket_stats_t *backend_stats_)
static int reply_stats (class zmq::socket_base_t *control_,
zmq_socket_stats_t *frontend_stats_,
zmq_socket_stats_t *backend_stats_)
{
// first part: frontend stats - the first send might fail due to HWM
if (loop_and_send_multipart_stat (control_, frontend_stats_->msg_in, true,