diff --git a/ACE/tests/Compiler_Features_16_Test.cpp b/ACE/tests/Compiler_Features_16_Test.cpp index b806b572929e3..7e096346af009 100644 --- a/ACE/tests/Compiler_Features_16_Test.cpp +++ b/ACE/tests/Compiler_Features_16_Test.cpp @@ -11,8 +11,6 @@ #include #include -static constexpr uint32_t bound = std::numeric_limits::max(); - namespace CORBA { // First forward declare TCKind, this is legal with C++11 enum class TCKind : uint32_t; @@ -27,10 +25,9 @@ namespace CORBA { // And another forward declared TCKind, after it has been // declared enum class TCKind : uint32_t; -}; +} -std::ostream& operator<< -(std::ostream& strm,CORBA::TCKind _enumerator) +std::ostream& operator<< (std::ostream& strm, CORBA::TCKind _enumerator) { switch (_enumerator) { case CORBA::TCKind::tk_null: return strm << "CORBA::TCKind::tk_null"; break; diff --git a/ACE/tests/MM_Shared_Memory_Test.cpp b/ACE/tests/MM_Shared_Memory_Test.cpp index 74b4f1ec4f511..1bdb70cad8e0d 100644 --- a/ACE/tests/MM_Shared_Memory_Test.cpp +++ b/ACE/tests/MM_Shared_Memory_Test.cpp @@ -25,10 +25,6 @@ #if !defined (ACE_LACKS_MMAP) -static const char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; -const int SHMSZ = 27; -static ACE_TCHAR *shm_key; - #if defined (ACE_LACKS_FORK) #include "ace/Thread_Semaphore.h" typedef ACE_Thread_Semaphore SYNCHRONIZER; @@ -65,6 +61,11 @@ const ACE_TCHAR *sem_name () } #endif /* !defined (ACE_LACKS_FORK) */ +#ifndef ACE_DISABLE_MKTEMP +static const char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; +const int SHMSZ = 27; +static ACE_TCHAR *shm_key; + // Synchronize the start of the parent and the child. static SYNCHRONIZER *synchronizer = 0; @@ -194,6 +195,7 @@ spawn (void) #endif /* ACE_HAS_THREADS */ return 0; } +#endif /* !ACE_DISABLE_MKTEMP */ #endif /* !ACE_LACKS_MMAP */ int diff --git a/ACE/tests/Multicast_Interfaces_Test.cpp b/ACE/tests/Multicast_Interfaces_Test.cpp index d3b755866617d..6a26e73cfc5a1 100644 --- a/ACE/tests/Multicast_Interfaces_Test.cpp +++ b/ACE/tests/Multicast_Interfaces_Test.cpp @@ -105,6 +105,8 @@ get_valid_ipv4_interface_names (nameset &names) get_valid_ipv4_interface_names_win32 (names); #elif defined (ACE_HAS_GETIFADDRS) get_valid_ipv4_interface_names_getifaddrs (names); +#else + ACE_UNUSED_ARG (names); #endif /* ACE_WIN32 */ } diff --git a/ACE/tests/OS_Test.cpp b/ACE/tests/OS_Test.cpp index 65115e9b27bbd..ff00d50350fb7 100644 --- a/ACE/tests/OS_Test.cpp +++ b/ACE/tests/OS_Test.cpp @@ -1212,7 +1212,7 @@ ace_ctype_test (void) ++retval; } - return 0; + return retval; } int diff --git a/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp b/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp index 083dda5e5ff22..9ecfc84a2de7d 100644 --- a/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp +++ b/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp @@ -385,7 +385,7 @@ dev_poll_reactor_factory (void) * * Reactor test execution functor. */ -struct Run_Test : public std::unary_function +struct Run_Test { /// Function call operator overload. void operator() (reactor_factory_type factory) diff --git a/ACE/tests/Recursive_Condition_Test.cpp b/ACE/tests/Recursive_Condition_Test.cpp index e1e596edf71fd..bd884ad624c85 100644 --- a/ACE/tests/Recursive_Condition_Test.cpp +++ b/ACE/tests/Recursive_Condition_Test.cpp @@ -236,8 +236,8 @@ run_main (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Recursive_Condition_Test")); -#if defined (ACE_HAS_THREADS) int status = 0; +#if defined (ACE_HAS_THREADS) /* Test 1 - Simple test */ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Test 1...\n"))); @@ -293,6 +293,6 @@ run_main (int, ACE_TCHAR *[]) ACE_TEXT ("ACE doesn't support recursive condition variables on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; - return 0; + return status; } diff --git a/ACE/tests/SOCK_Send_Recv_Test_IPV6.cpp b/ACE/tests/SOCK_Send_Recv_Test_IPV6.cpp index b93f38ef47939..fb23667def3ef 100644 --- a/ACE/tests/SOCK_Send_Recv_Test_IPV6.cpp +++ b/ACE/tests/SOCK_Send_Recv_Test_IPV6.cpp @@ -32,6 +32,8 @@ static int Test_Result = 0; #if !defined (ACE_LACKS_FORK) || defined (ACE_HAS_THREADS) +#if defined (ACE_HAS_IPV6) + // In test 3, a large amount of data is sent. The purpose is to overflow the // TCP send window, causing the sender to block (it's a send_n). This value // is the amount to send. The assumption is that no implementation has a @@ -43,9 +45,6 @@ const size_t Test3_Send_Size = 4*1024; const size_t Test3_Loops = 10; const size_t Test3_Total_Size = Test3_Send_Size * Test3_Loops; - -#if defined (ACE_HAS_IPV6) - static void * client (void *arg) { diff --git a/ACE/tests/STL_algorithm_Test_T.cpp b/ACE/tests/STL_algorithm_Test_T.cpp index 29e34919c26a5..fba1ae9f6de20 100644 --- a/ACE/tests/STL_algorithm_Test_T.cpp +++ b/ACE/tests/STL_algorithm_Test_T.cpp @@ -12,9 +12,12 @@ class Element_Counter Element_Counter (void) : count_ (0) { - } +#ifdef ACE_HAS_CPP11 + Element_Counter (const Element_Counter &) = default; +#endif + void operator () (typename T::value_type & item) { ++ this->count_; diff --git a/ACE/tests/Sendfile_Test.cpp b/ACE/tests/Sendfile_Test.cpp index 509dea6359ee9..81f6b6378cc72 100644 --- a/ACE/tests/Sendfile_Test.cpp +++ b/ACE/tests/Sendfile_Test.cpp @@ -29,16 +29,6 @@ static int Test_Result = 0; #if !defined (ACE_LACKS_FORK) || defined (ACE_HAS_THREADS) -// This test sends a large amount of data. The purpose is to overflow the -// TCP send window, causing the sender to block (it's a send_n). This value -// is the amount to send. The assumption is that no implementation has a -// receive window larger than 128K bytes. If one is found, this is the place -// to change it. -// For some odd reason, NT will try to send a single large buffer, but not -// multiple smaller ones that add up to the large size. -const size_t Test3_Send_Size = 4*1024; -const size_t Test3_Loops = 10; - static void * client (void *arg) { diff --git a/ACE/tests/Thread_Pool_Test.cpp b/ACE/tests/Thread_Pool_Test.cpp index 6e4d0a061bf9f..be8ebb52c5100 100644 --- a/ACE/tests/Thread_Pool_Test.cpp +++ b/ACE/tests/Thread_Pool_Test.cpp @@ -205,9 +205,7 @@ Thread_Pool::test_queue_deactivation_shutdown (void) // Run the main loop that generates messages and enqueues them into // the pool of threads managed by . - for (size_t count = 0; - ; - count++) + while (true) { ssize_t n = 0; @@ -296,10 +294,7 @@ Thread_Pool::test_empty_message_shutdown (void) // Run the main loop that generates messages and enqueues them into // the pool of threads managed by . - - for (size_t count = 0; - ; - count++) + while (true) { ssize_t n = 0; diff --git a/ACE/tests/Unbounded_Set_Test.cpp b/ACE/tests/Unbounded_Set_Test.cpp index b551735de33c9..47cba8f441447 100644 --- a/ACE/tests/Unbounded_Set_Test.cpp +++ b/ACE/tests/Unbounded_Set_Test.cpp @@ -25,6 +25,7 @@ struct MyNode MyNode () : k (0) {} MyNode (int pk) : k (pk) {} MyNode (const MyNode& o) : k (o.k) {} + MyNode& operator= (const MyNode& o) { k = o.k; return *this; } bool operator== (const MyNode& o) const { return (k == o.k); } }; diff --git a/ACE/tests/randomize.h b/ACE/tests/randomize.h index 5389814548f91..6a46ba19a0743 100644 --- a/ACE/tests/randomize.h +++ b/ACE/tests/randomize.h @@ -55,7 +55,7 @@ namespace randomize_element (T * array, size_t size, unsigned int seed) : array_ (array) - , coefficient_ (static_cast (size) / (RAND_MAX + 1.0f)) + , coefficient_ (static_cast (size) / (RAND_MAX + 1.0)) , seed_ (seed) { }