Skip to content

Commit

Permalink
Merge pull request #863 from jwillemsen/jwi-cpp11warningtest
Browse files Browse the repository at this point in the history
Fix c++11 auto_ptr warning
  • Loading branch information
jwillemsen authored Mar 6, 2019
2 parents 9e20519 + 080fb22 commit fa4af72
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 59 deletions.
2 changes: 0 additions & 2 deletions ACE/tests/Process_Manual_Event_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Process.h"
#include "ace/Manual_Event.h"
Expand All @@ -23,7 +22,6 @@
#include "ace/OS_NS_unistd.h"
#include "ace/os_include/os_dirent.h"


#if (!defined (ACE_LACKS_FORK) || defined (ACE_WIN32)) && \
(defined (ACE_WIN32) || \
(defined (ACE_HAS_PTHREADS) && defined (_POSIX_THREAD_PROCESS_SHARED) && \
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Process_Mutex_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Mutex.h"
#include "ace/Process.h"
Expand All @@ -20,8 +19,6 @@
#include "ace/OS_NS_fcntl.h"
#include "ace/os_include/os_dirent.h"



static int release_mutex = 1;
static int child_process = 0;
static const ACE_TCHAR *mutex_name = ACE_DEFAULT_MUTEX;
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Process_Semaphore_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Mutex.h"
#include "ace/Process.h"
Expand All @@ -30,8 +29,6 @@
#include "ace/OS_NS_stdlib.h"
#include "ace/SString.h"



#if !defined (ACE_LACKS_FORK)
static int iterations = 10;
static int child_process = 0;
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Process_Strategy_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_unistd.h"
Expand All @@ -49,8 +48,6 @@
// Counting_Service and Options in here
#include "Process_Strategy_Test.h"



// This test does not function properly when fork() is used on HP-UX
#if defined(__hpux)
#define ACE_LACKS_FORK
Expand Down
2 changes: 0 additions & 2 deletions ACE/tests/Process_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Process.h"
#include "ace/Get_Opt.h"
Expand All @@ -25,7 +24,6 @@
// 'self' level and link to the opened file name.
static const char *proc_self_fd = "/proc/self/fd/";


int
test_setenv (void)
{
Expand Down
4 changes: 0 additions & 4 deletions ACE/tests/RB_Tree_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@
*/
//=============================================================================


#include "test_config.h" /* Include first to enable ACE_TEST_ASSERT. */
#include "ace/RB_Tree.h"
#include "ace/SString.h"
#include "ace/Null_Mutex.h"

#include "RB_Tree_Test.h"



// Type definitions for the four distinct parameterizations of the
// test.

Expand Down
6 changes: 1 addition & 5 deletions ACE/tests/Reactor_Dispatch_Order_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/OS_NS_string.h"
#include "ace/Reactor.h"
Expand All @@ -20,10 +19,7 @@
#include "ace/Pipe.h"
#include "ace/ACE.h"



static const char *message =
"Hello there! Hope you get this message";
static const char *message = "Hello there! Hope you get this message";

class Handler : public ACE_Event_Handler
{
Expand Down
6 changes: 1 addition & 5 deletions ACE/tests/Reactor_Dispatch_Order_Test_Dev_Poll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/OS_NS_string.h"
#include "ace/Reactor.h"
Expand All @@ -20,12 +19,9 @@
#include "ace/Pipe.h"
#include "ace/ACE.h"



#if defined (ACE_HAS_DEV_POLL) || defined (ACE_HAS_EVENT_POLL)

static const char *message =
"Hello there! Hope you get this message";
static const char *message = "Hello there! Hope you get this message";

class Handler : public ACE_Event_Handler
{
Expand Down
1 change: 0 additions & 1 deletion ACE/tests/Reactor_Exceptions_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Reactor.h"
#include "ace/SOCK_Dgram.h"
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Reactor_Fairness_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "Reactor_Fairness_Test.h"
#include "ace/Get_Opt.h"
Expand All @@ -29,8 +28,6 @@
#include "ace/Atomic_Op.h"
#include "ace/Thread_Mutex.h"



#if defined (ACE_HAS_THREADS)

namespace {
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Reactor_Notify_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/OS_NS_unistd.h"
#include "ace/Synch_Traits.h"
Expand All @@ -25,8 +24,6 @@
#include "ace/Select_Reactor.h"
#include "ace/Thread_Semaphore.h"



#if defined (ACE_HAS_THREADS)

static const time_t LONG_TIMEOUT = 10;
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Reactor_Performance_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "Reactor_Performance_Test.h"
#include "ace/Profile_Timer.h"
Expand All @@ -25,8 +24,6 @@
#include "ace/Select_Reactor.h"
#include "ace/Auto_Ptr.h"



#if defined (ACE_HAS_THREADS) && !defined ACE_LACKS_ACCEPT

static const char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz";
Expand Down
1 change: 0 additions & 1 deletion ACE/tests/Reactor_Registration_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Pipe.h"
#include "ace/Reactor.h"
Expand Down
1 change: 0 additions & 1 deletion ACE/tests/Reactor_Remove_Resume_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* @author Ossama Othman
*/


#include "test_config.h"
#include "ace/Reactor.h"
#include "ace/TP_Reactor.h"
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Reactor_Timer_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Timer_Queue.h"
#include "ace/Reactor.h"
Expand All @@ -23,8 +22,6 @@
#include "ace/Timer_Heap.h"
#include "ace/Auto_Ptr.h"



static int done = 0;
static int the_count = 0;
static int odd = 0;
Expand Down
6 changes: 0 additions & 6 deletions ACE/tests/Reactors_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Task.h"
#include "ace/Reactor.h"
#include "ace/Atomic_Op.h"
#include "ace/Recursive_Thread_Mutex.h"



#if defined (ACE_HAS_THREADS)

ACE_Thread_Manager *thr_mgr;
Expand Down Expand Up @@ -62,9 +59,6 @@ class Test_Task : public ACE_Task<ACE_MT_SYNCH>
int Test_Task::task_count_ = 0;

static ACE_Atomic_Op<ACE_Thread_Mutex, int> done_count = MAX_TASKS * 2;



static ACE_Recursive_Thread_Mutex recursive_lock;

Test_Task::Test_Task (void)
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Reader_Writer_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Thread.h"
#include "ace/Thread_Manager.h"
Expand All @@ -22,8 +21,6 @@
#include "ace/RW_Thread_Mutex.h"
#include "ace/Time_Value.h"



#if defined (ACE_HAS_THREADS)

// Default number of iterations.
Expand Down
1 change: 0 additions & 1 deletion ACE/tests/Recursive_Condition_Bug_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/OS_NS_sys_time.h"
#include "ace/Task_T.h"
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Recursive_Condition_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_sys_time.h"
Expand All @@ -21,8 +20,6 @@
#include "ace/Timer_Heap.h"
#include "ace/Timer_Queue_Adapters.h"



#if defined (ACE_HAS_THREADS)

typedef ACE_Thread_Timer_Queue_Adapter<ACE_Timer_Heap> Thread_Timer_Queue;
Expand Down
1 change: 0 additions & 1 deletion ACE/tests/Refcounted_Auto_Ptr_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/ACE.h"
#include "ace/Task.h"
Expand Down
3 changes: 0 additions & 3 deletions ACE/tests/Reverse_Lock_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@
*/
//=============================================================================


#include "test_config.h"
#include "ace/Synch_Traits.h"
#include "ace/Thread_Mutex.h"
#include "ace/Guard_T.h"
#include "ace/Reverse_Lock_T.h"



typedef ACE_Reverse_Lock<ACE_SYNCH_MUTEX> REVERSE_MUTEX;

int
Expand Down
4 changes: 4 additions & 0 deletions ACE/tests/Task_Ex_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ int Consumer::svc ()
while(this->getq (pMsg)!=-1)
{
ACE_TEST_ASSERT (pMsg!=0);
#if defined (ACE_HAS_CPP11)
std::unique_ptr<User_Defined_Msg> pAuto(pMsg);
#else
auto_ptr<User_Defined_Msg> pAuto(pMsg);
#endif /* ACE_HAS_CPP11 */
ACE_DEBUG((LM_DEBUG,
ACE_TEXT("Consumer::svc got msg id=%d\n"),
pMsg->msg_id ()));
Expand Down

0 comments on commit fa4af72

Please sign in to comment.