mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-01 02:56:56 +01:00
Problem: unused include directives
Solution: remove and add where needed
This commit is contained in:
parent
d0c4402daf
commit
1450830611
@ -33,6 +33,7 @@
|
||||
#if !defined ZMQ_HAVE_WINDOWS
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#include "address.hpp"
|
||||
|
@ -209,6 +209,9 @@ endif()
|
||||
|
||||
# add include dirs for all targets
|
||||
include_directories("${ZeroMQ_SOURCE_DIR}/../include" "${ZeroMQ_BINARY_DIR}")
|
||||
if(WIN32)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif()
|
||||
|
||||
foreach(test ${tests})
|
||||
# target_sources not supported before CMake 3.1
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "testutil_unity.hpp"
|
||||
#include <unity.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -47,6 +47,7 @@ void tearDown ()
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h> // for sleep()
|
||||
#include <sched.h>
|
||||
|
||||
#define TEST_POLICY \
|
||||
(SCHED_OTHER) // NOTE: SCHED_OTHER is the default Linux scheduler
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,9 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <grp.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -32,6 +32,10 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -26,10 +26,13 @@
|
||||
typedef SOCKET raw_socket;
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
typedef int raw_socket;
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// TODO remove this here, either ensure that UINT16_MAX is always properly
|
||||
// defined or handle this at a more central location
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// NOTE: on OSX the endpoint returned by ZMQ_LAST_ENDPOINT may be quite long,
|
||||
// ensure we have extra space for that:
|
||||
#define SOCKET_STRING_LEN (MAX_SOCKET_STRING * 4)
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -27,9 +27,12 @@
|
||||
typedef SOCKET raw_socket;
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
typedef int raw_socket;
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
|
@ -32,6 +32,9 @@
|
||||
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -33,6 +33,13 @@
|
||||
#include <unity.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,9 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -29,8 +29,10 @@
|
||||
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
//
|
||||
// Asynchronous proxy test using ZMQ_XPUB_NODROP and HWM:
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -32,6 +32,15 @@
|
||||
|
||||
#include <unity.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
// Helper macro to define the v4/v6 function pairs
|
||||
#define MAKE_TEST_V4V6(_test) \
|
||||
static void _test##_ipv4 () { _test (false); } \
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -41,6 +41,9 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// This test requires a KRB5 environment with the following
|
||||
// service principal (substitute your host.domain and REALM):
|
||||
//
|
||||
|
@ -42,6 +42,8 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static void zap_handler (void *handler_)
|
||||
{
|
||||
// Process ZAP requests forever
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static void zap_handler (void *zap_)
|
||||
{
|
||||
// Process ZAP requests forever
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
}
|
||||
|
@ -30,6 +30,9 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp ()
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,14 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,6 +30,9 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -30,7 +30,10 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
@ -47,6 +50,7 @@ void tearDown ()
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int setup_socket_and_set_fd (void *zmq_socket_,
|
||||
int af_,
|
||||
|
@ -31,8 +31,13 @@
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#include <unity.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
setup_test_context ();
|
||||
|
@ -29,8 +29,38 @@
|
||||
#include "testutil.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined _WIN32
|
||||
#include "../src/windows.hpp"
|
||||
#if defined _MSC_VER
|
||||
#include <crtdbg.h>
|
||||
#pragma warning(disable : 4996)
|
||||
// iphlpapi is needed for if_nametoindex (not on Windows XP)
|
||||
#if !defined ZMQ_HAVE_WINDOWS_TARGET_XP
|
||||
#pragma comment(lib, "iphlpapi")
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <grp.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#if defined(ZMQ_HAVE_AIX)
|
||||
#include <sys/types.h>
|
||||
#include <sys/socketvar.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
const char *SEQ_END = (const char *) 1;
|
||||
|
||||
const char bounce_content[] = "12345678ABCDEFGH12345678abcdefgh";
|
||||
|
@ -58,39 +58,6 @@
|
||||
#define PORT_6 5561
|
||||
|
||||
#undef NDEBUG
|
||||
#include <time.h>
|
||||
#include <stdarg.h>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
|
||||
#if defined _WIN32
|
||||
#include "../src/windows.hpp"
|
||||
#if defined _MSC_VER
|
||||
#include <crtdbg.h>
|
||||
#pragma warning(disable : 4996)
|
||||
// iphlpapi is needed for if_nametoindex (not on Windows XP)
|
||||
#if !defined ZMQ_HAVE_WINDOWS_TARGET_XP
|
||||
#pragma comment(lib, "iphlpapi")
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <grp.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#if defined(ZMQ_HAVE_AIX)
|
||||
#include <sys/types.h>
|
||||
#include <sys/socketvar.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// duplicated from fd.hpp
|
||||
#ifdef ZMQ_HAVE_WINDOWS
|
||||
|
@ -29,6 +29,9 @@
|
||||
#include "testutil_monitoring.hpp"
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// Read one event off the monitor socket; return value and address
|
||||
// by reference, if not null, and event number by value. Returns -1
|
||||
// in case of error.
|
||||
|
@ -28,6 +28,9 @@
|
||||
*/
|
||||
#include "testutil_security.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
const char *test_zap_domain = "ZAPTEST";
|
||||
|
||||
void socket_config_null_client (void *server_, void *server_secret_)
|
||||
|
@ -28,6 +28,13 @@
|
||||
*/
|
||||
#include "testutil_unity.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
int test_assert_success_message_errno_helper (int rc_,
|
||||
const char *msg_,
|
||||
const char *expr_)
|
||||
|
@ -25,6 +25,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <ip_resolver.hpp>
|
||||
#include <ip.hpp>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
void setUp ()
|
||||
{
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define __UNITTEST_RESOLVER_COMMON_INCLUDED__
|
||||
|
||||
#include <ip_resolver.hpp>
|
||||
#include <string.h>
|
||||
|
||||
// Attempt a resolution and test the results.
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user