mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Merge pull request #3513 from bluca/clang7
Problem: clang-format 5 has issues with comments
This commit is contained in:
commit
046ccfc408
13
.travis.yml
13
.travis.yml
@ -99,14 +99,15 @@ matrix:
|
||||
- env: BUILD_TYPE=android CURVE=tweetnacl
|
||||
os: linux
|
||||
dist: trusty
|
||||
- env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=/usr/local/clang-5.0.0/bin/clang-format
|
||||
- env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=/usr/lib/llvm-7/bin/clang-format
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- clang-5.0
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-trusty-7
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- clang-format-7
|
||||
- env: BUILD_TYPE=default POLLER=poll
|
||||
os: linux
|
||||
- env: BUILD_TYPE=default POLLER=select
|
||||
|
@ -761,10 +761,10 @@ int zmq::options_t::setsockopt (int option_,
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO mechanism should either be set explicitly, or determined when
|
||||
// connecting. currently, it depends on the order of setsockopt calls
|
||||
// if there is some inconsistency, which is confusing. in addition,
|
||||
// the assumed or set mechanism should be queryable (as a socket option)
|
||||
// TODO mechanism should either be set explicitly, or determined when
|
||||
// connecting. currently, it depends on the order of setsockopt calls
|
||||
// if there is some inconsistency, which is confusing. in addition,
|
||||
// the assumed or set mechanism should be queryable (as a socket option)
|
||||
|
||||
#if defined(ZMQ_ACT_MILITANT)
|
||||
// There is no valid use case for passing an error back to the application
|
||||
|
@ -353,9 +353,9 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Check whether socket type and transport protocol match.
|
||||
// Specifically, multicast protocols can't be combined with
|
||||
// bi-directional messaging patterns (socket types).
|
||||
// Check whether socket type and transport protocol match.
|
||||
// Specifically, multicast protocols can't be combined with
|
||||
// bi-directional messaging patterns (socket types).
|
||||
#if defined ZMQ_HAVE_OPENPGM || defined ZMQ_HAVE_NORM
|
||||
if ((protocol_ == "pgm" || protocol_ == "epgm" || protocol_ == "norm")
|
||||
&& options.type != ZMQ_PUB && options.type != ZMQ_SUB
|
||||
@ -896,7 +896,7 @@ int zmq::socket_base_t::connect (const char *endpoint_uri_)
|
||||
}
|
||||
}
|
||||
|
||||
// TBD - Should we check address for ZMQ_HAVE_NORM???
|
||||
// TBD - Should we check address for ZMQ_HAVE_NORM???
|
||||
|
||||
#ifdef ZMQ_HAVE_OPENPGM
|
||||
if (protocol == "pgm" || protocol == "epgm") {
|
||||
|
@ -255,7 +255,7 @@ int zmq::socks_connecter_t::connect_to_proxy ()
|
||||
}
|
||||
}
|
||||
|
||||
// Connect to the remote peer.
|
||||
// Connect to the remote peer.
|
||||
#if defined ZMQ_HAVE_VXWORKS
|
||||
rc = ::connect (_s, (sockaddr *) tcp_addr->addr (), tcp_addr->addrlen ());
|
||||
#else
|
||||
|
@ -219,7 +219,7 @@ int zmq::tcp_connecter_t::open ()
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Connect to the remote peer.
|
||||
// Connect to the remote peer.
|
||||
#if defined ZMQ_HAVE_VXWORKS
|
||||
rc = ::connect (_s, (sockaddr *) tcp_addr->addr (), tcp_addr->addrlen ());
|
||||
#else
|
||||
@ -230,8 +230,8 @@ int zmq::tcp_connecter_t::open ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Translate error codes indicating asynchronous connect has been
|
||||
// launched to a uniform EINPROGRESS.
|
||||
// Translate error codes indicating asynchronous connect has been
|
||||
// launched to a uniform EINPROGRESS.
|
||||
#ifdef ZMQ_HAVE_WINDOWS
|
||||
const int last_error = WSAGetLastError ();
|
||||
if (last_error == WSAEINPROGRESS || last_error == WSAEWOULDBLOCK)
|
||||
|
@ -222,8 +222,8 @@ void zmq::udp_engine_t::plug (io_thread_t *io_thread_, session_base_t *session_)
|
||||
bool multicast = udp_addr->is_mcast ();
|
||||
|
||||
if (multicast) {
|
||||
// Multicast addresses should be allowed to bind to more than
|
||||
// one port as all ports should receive the message
|
||||
// Multicast addresses should be allowed to bind to more than
|
||||
// one port as all ports should receive the message
|
||||
#ifdef SO_REUSEPORT
|
||||
rc = setsockopt (_fd, SOL_SOCKET, SO_REUSEPORT,
|
||||
reinterpret_cast<char *> (&on), sizeof (on));
|
||||
|
@ -62,9 +62,9 @@ template <typename T, int N> class ypipe_t : public ypipe_base_t<T>
|
||||
// just to keep ICC and code checking tools from complaining.
|
||||
inline virtual ~ypipe_t () {}
|
||||
|
||||
// Following function (write) deliberately copies uninitialised data
|
||||
// when used with zmq_msg. Initialising the VSM body for
|
||||
// non-VSM messages won't be good for performance.
|
||||
// Following function (write) deliberately copies uninitialised data
|
||||
// when used with zmq_msg. Initialising the VSM body for
|
||||
// non-VSM messages won't be good for performance.
|
||||
|
||||
#ifdef ZMQ_HAVE_OPENVMS
|
||||
#pragma message save
|
||||
|
@ -53,9 +53,9 @@ template <typename T> class ypipe_conflate_t : public ypipe_base_t<T>
|
||||
// just to keep ICC and code checking tools from complaining.
|
||||
inline virtual ~ypipe_conflate_t () {}
|
||||
|
||||
// Following function (write) deliberately copies uninitialised data
|
||||
// when used with zmq_msg. Initialising the VSM body for
|
||||
// non-VSM messages won't be good for performance.
|
||||
// Following function (write) deliberately copies uninitialised data
|
||||
// when used with zmq_msg. Initialising the VSM body for
|
||||
// non-VSM messages won't be good for performance.
|
||||
|
||||
#ifdef ZMQ_HAVE_OPENVMS
|
||||
#pragma message save
|
||||
|
@ -700,7 +700,7 @@ const char *zmq_msg_gets (const zmq_msg_t *msg_, const char *property_)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Polling.
|
||||
// Polling.
|
||||
|
||||
#if defined ZMQ_HAVE_POLLER
|
||||
inline int zmq_poller_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
|
||||
|
Loading…
x
Reference in New Issue
Block a user