diff --git a/.travis.yml b/.travis.yml index 80cfddef..0e0ad17b 100644 --- a/.travis.yml +++ b/.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 diff --git a/src/options.cpp b/src/options.cpp index d5f18018..b6ae3ea2 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -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 diff --git a/src/socket_base.cpp b/src/socket_base.cpp index f1934fd2..e1b2fae7 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -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") { diff --git a/src/socks_connecter.cpp b/src/socks_connecter.cpp index 9e068e8e..71c28a0e 100644 --- a/src/socks_connecter.cpp +++ b/src/socks_connecter.cpp @@ -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 diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index 863f223f..67cca590 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -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) diff --git a/src/udp_engine.cpp b/src/udp_engine.cpp index 4707773b..6276fe26 100644 --- a/src/udp_engine.cpp +++ b/src/udp_engine.cpp @@ -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 (&on), sizeof (on)); diff --git a/src/ypipe.hpp b/src/ypipe.hpp index 0f2b9e72..34dc5b69 100644 --- a/src/ypipe.hpp +++ b/src/ypipe.hpp @@ -62,9 +62,9 @@ template class ypipe_t : public ypipe_base_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 diff --git a/src/ypipe_conflate.hpp b/src/ypipe_conflate.hpp index 9d75eb9a..ac8141b9 100644 --- a/src/ypipe_conflate.hpp +++ b/src/ypipe_conflate.hpp @@ -53,9 +53,9 @@ template class ypipe_conflate_t : public ypipe_base_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 diff --git a/src/zmq.cpp b/src/zmq.cpp index a2ad7f8a..e2481dd3 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -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_)