mirror of
https://github.com/zeromq/libzmq.git
synced 2025-07-02 08:53:32 +02:00
Problem: formatting issues in the CI
Solution: commit clang-format-diff
This commit is contained in:
parent
fef99d6c50
commit
8d544ef1c4
@ -641,9 +641,9 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
|
|||||||
*w_ = *r_ = -1;
|
*w_ = *r_ = -1;
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
// If there's no SOCK_CLOEXEC, let's try the second best option. Note that
|
// If there's no SOCK_CLOEXEC, let's try the second best option. Note that
|
||||||
// race condition can cause socket not to be closed (if fork happens
|
// race condition can cause socket not to be closed (if fork happens
|
||||||
// between socket creation and this point).
|
// between socket creation and this point).
|
||||||
#if !defined ZMQ_HAVE_SOCK_CLOEXEC && defined FD_CLOEXEC
|
#if !defined ZMQ_HAVE_SOCK_CLOEXEC && defined FD_CLOEXEC
|
||||||
rc = fcntl (sv[0], F_SETFD, FD_CLOEXEC);
|
rc = fcntl (sv[0], F_SETFD, FD_CLOEXEC);
|
||||||
errno_assert (rc != -1);
|
errno_assert (rc != -1);
|
||||||
|
@ -717,10 +717,10 @@ int zmq::options_t::setsockopt (int option_,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO mechanism should either be set explicitly, or determined when
|
// TODO mechanism should either be set explicitly, or determined when
|
||||||
// connecting. currently, it depends on the order of setsockopt calls
|
// connecting. currently, it depends on the order of setsockopt calls
|
||||||
// if there is some inconsistency, which is confusing. in addition,
|
// if there is some inconsistency, which is confusing. in addition,
|
||||||
// the assumed or set mechanism should be queryable (as a socket option)
|
// the assumed or set mechanism should be queryable (as a socket option)
|
||||||
|
|
||||||
#if defined(ZMQ_ACT_MILITANT)
|
#if defined(ZMQ_ACT_MILITANT)
|
||||||
// There is no valid use case for passing an error back to the application
|
// There is no valid use case for passing an error back to the application
|
||||||
|
@ -313,9 +313,9 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check whether socket type and transport protocol match.
|
// Check whether socket type and transport protocol match.
|
||||||
// Specifically, multicast protocols can't be combined with
|
// Specifically, multicast protocols can't be combined with
|
||||||
// bi-directional messaging patterns (socket types).
|
// bi-directional messaging patterns (socket types).
|
||||||
#if defined ZMQ_HAVE_OPENPGM || defined ZMQ_HAVE_NORM
|
#if defined ZMQ_HAVE_OPENPGM || defined ZMQ_HAVE_NORM
|
||||||
if ((protocol_ == "pgm" || protocol_ == "epgm" || protocol_ == "norm")
|
if ((protocol_ == "pgm" || protocol_ == "epgm" || protocol_ == "norm")
|
||||||
&& options.type != ZMQ_PUB && options.type != ZMQ_SUB
|
&& options.type != ZMQ_PUB && options.type != ZMQ_SUB
|
||||||
@ -878,7 +878,7 @@ int zmq::socket_base_t::connect (const char *addr_)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TBD - Should we check address for ZMQ_HAVE_NORM???
|
// TBD - Should we check address for ZMQ_HAVE_NORM???
|
||||||
|
|
||||||
#ifdef ZMQ_HAVE_OPENPGM
|
#ifdef ZMQ_HAVE_OPENPGM
|
||||||
if (protocol == "pgm" || protocol == "epgm") {
|
if (protocol == "pgm" || protocol == "epgm") {
|
||||||
|
@ -357,7 +357,7 @@ int zmq::socks_connecter_t::connect_to_proxy ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connect to the remote peer.
|
// Connect to the remote peer.
|
||||||
#if defined ZMQ_HAVE_VXWORKS
|
#if defined ZMQ_HAVE_VXWORKS
|
||||||
rc = ::connect (s, (sockaddr *) tcp_addr->addr (), tcp_addr->addrlen ());
|
rc = ::connect (s, (sockaddr *) tcp_addr->addr (), tcp_addr->addrlen ());
|
||||||
#else
|
#else
|
||||||
|
@ -347,7 +347,7 @@ int zmq::tcp_connecter_t::open ()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connect to the remote peer.
|
// Connect to the remote peer.
|
||||||
#if defined ZMQ_HAVE_VXWORKS
|
#if defined ZMQ_HAVE_VXWORKS
|
||||||
rc = ::connect (s, (sockaddr *) tcp_addr->addr (), tcp_addr->addrlen ());
|
rc = ::connect (s, (sockaddr *) tcp_addr->addr (), tcp_addr->addrlen ());
|
||||||
#else
|
#else
|
||||||
@ -358,8 +358,8 @@ int zmq::tcp_connecter_t::open ()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate error codes indicating asynchronous connect has been
|
// Translate error codes indicating asynchronous connect has been
|
||||||
// launched to a uniform EINPROGRESS.
|
// launched to a uniform EINPROGRESS.
|
||||||
#ifdef ZMQ_HAVE_WINDOWS
|
#ifdef ZMQ_HAVE_WINDOWS
|
||||||
const int last_error = WSAGetLastError ();
|
const int last_error = WSAGetLastError ();
|
||||||
if (last_error == WSAEINPROGRESS || last_error == WSAEWOULDBLOCK)
|
if (last_error == WSAEINPROGRESS || last_error == WSAEWOULDBLOCK)
|
||||||
|
@ -32,16 +32,18 @@
|
|||||||
*/
|
*/
|
||||||
#include "platform.hpp"
|
#include "platform.hpp"
|
||||||
|
|
||||||
#if defined (ZMQ_USE_TWEETNACL)
|
#if defined(ZMQ_USE_TWEETNACL)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Disable warnings for this source only, rather than for the whole
|
Disable warnings for this source only, rather than for the whole
|
||||||
codebase when building with C99 (gcc >= 4.2) or with Microsoft's compiler
|
codebase when building with C99 (gcc >= 4.2) or with Microsoft's compiler
|
||||||
*/
|
*/
|
||||||
#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) && __STDC_VERSION__ < 201112L
|
#if defined __GNUC__ \
|
||||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) \
|
||||||
|
&& __STDC_VERSION__ < 201112L
|
||||||
|
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||||
#elif defined _MSC_VER
|
#elif defined _MSC_VER
|
||||||
# pragma warning (disable:4018 4244 4146)
|
#pragma warning(disable : 4018 4244 4146)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
@ -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.
|
// just to keep ICC and code checking tools from complaining.
|
||||||
inline virtual ~ypipe_t () {}
|
inline virtual ~ypipe_t () {}
|
||||||
|
|
||||||
// Following function (write) deliberately copies uninitialised data
|
// Following function (write) deliberately copies uninitialised data
|
||||||
// when used with zmq_msg. Initialising the VSM body for
|
// when used with zmq_msg. Initialising the VSM body for
|
||||||
// non-VSM messages won't be good for performance.
|
// non-VSM messages won't be good for performance.
|
||||||
|
|
||||||
#ifdef ZMQ_HAVE_OPENVMS
|
#ifdef ZMQ_HAVE_OPENVMS
|
||||||
#pragma message save
|
#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.
|
// just to keep ICC and code checking tools from complaining.
|
||||||
inline virtual ~ypipe_conflate_t () {}
|
inline virtual ~ypipe_conflate_t () {}
|
||||||
|
|
||||||
// Following function (write) deliberately copies uninitialised data
|
// Following function (write) deliberately copies uninitialised data
|
||||||
// when used with zmq_msg. Initialising the VSM body for
|
// when used with zmq_msg. Initialising the VSM body for
|
||||||
// non-VSM messages won't be good for performance.
|
// non-VSM messages won't be good for performance.
|
||||||
|
|
||||||
#ifdef ZMQ_HAVE_OPENVMS
|
#ifdef ZMQ_HAVE_OPENVMS
|
||||||
#pragma message save
|
#pragma message save
|
||||||
|
@ -685,7 +685,7 @@ const char *zmq_msg_gets (const zmq_msg_t *msg_, const char *property_)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Polling.
|
// Polling.
|
||||||
|
|
||||||
#if defined ZMQ_HAVE_POLLER
|
#if defined ZMQ_HAVE_POLLER
|
||||||
inline int zmq_poller_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
|
inline int zmq_poller_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user