summaryrefslogtreecommitdiff
path: root/ACE/tests
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-08-11 11:35:01 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2020-08-11 11:35:01 +0200
commit6ef233f574afae7756d7e00fcfc2dc726003dd60 (patch)
treee78ce9574d4282415b4e628f50127690beb7fdbc /ACE/tests
parent881df13c63134b837bd8f488a1758e14bf8ebcde (diff)
downloadATCD-6ef233f574afae7756d7e00fcfc2dc726003dd60.tar.gz
Removed various variables/members which are not used at all
* ACE/tests/Bound_Ptr_Test.cpp: * ACE/tests/Bound_Ptr_Test.h: * ACE/tests/Intrusive_Auto_Ptr_Test.cpp: * ACE/tests/Multicast_Test.cpp: * ACE/tests/Multicast_Test_IPV6.cpp: * ACE/tests/Object_Manager_Flipping_Test.cpp: * ACE/tests/Refcounted_Auto_Ptr_Test.cpp: * ACE/tests/Sendfile_Test.cpp: * ACE/tests/Thread_Attrs_Test.cpp: * ACE/tests/Thread_Creation_Threshold_Test.cpp:
Diffstat (limited to 'ACE/tests')
-rw-r--r--ACE/tests/Bound_Ptr_Test.cpp17
-rw-r--r--ACE/tests/Bound_Ptr_Test.h3
-rw-r--r--ACE/tests/Intrusive_Auto_Ptr_Test.cpp6
-rw-r--r--ACE/tests/Multicast_Test.cpp1
-rw-r--r--ACE/tests/Multicast_Test_IPV6.cpp1
-rw-r--r--ACE/tests/Object_Manager_Flipping_Test.cpp13
-rw-r--r--ACE/tests/Refcounted_Auto_Ptr_Test.cpp22
-rw-r--r--ACE/tests/Sendfile_Test.cpp2
-rw-r--r--ACE/tests/Thread_Attrs_Test.cpp9
-rw-r--r--ACE/tests/Thread_Creation_Threshold_Test.cpp2
10 files changed, 16 insertions, 60 deletions
diff --git a/ACE/tests/Bound_Ptr_Test.cpp b/ACE/tests/Bound_Ptr_Test.cpp
index 0147d14e1e3..85b7fdafe0a 100644
--- a/ACE/tests/Bound_Ptr_Test.cpp
+++ b/ACE/tests/Bound_Ptr_Test.cpp
@@ -177,22 +177,18 @@ Printer::print (void)
class Method_Request_print : public ACE_Method_Request
{
public:
- Method_Request_print (Scheduler *,
- Printer_var &printer);
+ Method_Request_print (Printer_var &printer);
virtual ~Method_Request_print (void);
/// This is the entry point into the Active Object method.
virtual int call (void);
private:
- Scheduler *scheduler_;
Printer_var printer_;
};
-Method_Request_print::Method_Request_print (Scheduler *new_scheduler,
- Printer_var &printer)
- : scheduler_ (new_scheduler),
- printer_ (printer)
+Method_Request_print::Method_Request_print (Printer_var &printer)
+ : printer_ (printer)
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) Method_Request_print created\n")));
@@ -255,8 +251,8 @@ Method_Request_end::call (void)
// Associates the activation queue with this task's message queue,
// allowing easy access to the message queue for shutting it down
// when it's time to stop this object's service threads.
-Scheduler::Scheduler (Scheduler *new_scheduler)
- : activation_queue_ (msg_queue ()), scheduler_ (new_scheduler)
+Scheduler::Scheduler (void)
+ : activation_queue_ (msg_queue ())
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) Scheduler created\n")));
@@ -332,8 +328,7 @@ void
Scheduler::print (Printer_var &printer)
{
this->activation_queue_.enqueue
- (new Method_Request_print (this,
- printer));
+ (new Method_Request_print (printer));
}
// Total number of loops.
diff --git a/ACE/tests/Bound_Ptr_Test.h b/ACE/tests/Bound_Ptr_Test.h
index c8e559b5ba0..b6bc6691c0e 100644
--- a/ACE/tests/Bound_Ptr_Test.h
+++ b/ACE/tests/Bound_Ptr_Test.h
@@ -49,7 +49,7 @@ class Scheduler : public ACE_Task<ACE_SYNCH>
friend class Method_Request_end;
public:
/// Constructor.
- Scheduler (Scheduler * = 0);
+ Scheduler (void);
/// Initializer.
virtual int open (void *args = 0);
@@ -72,7 +72,6 @@ protected:
private:
// = These are the <Scheduler> implementation details.
ACE_Activation_Queue activation_queue_;
- Scheduler *scheduler_;
};
#endif /* ACE_HAS_THREADS */
diff --git a/ACE/tests/Intrusive_Auto_Ptr_Test.cpp b/ACE/tests/Intrusive_Auto_Ptr_Test.cpp
index ae363730966..fca362e4b45 100644
--- a/ACE/tests/Intrusive_Auto_Ptr_Test.cpp
+++ b/ACE/tests/Intrusive_Auto_Ptr_Test.cpp
@@ -15,17 +15,13 @@
#include "ace/Intrusive_Auto_Ptr.h"
#include "ace/Thread_Manager.h"
-
-
class One {
-
static bool released;
- int m2;
int ref;
public:
- One (int refcount) : m2(0), ref(refcount)
+ One (int refcount) : ref(refcount)
{
released = false;
}
diff --git a/ACE/tests/Multicast_Test.cpp b/ACE/tests/Multicast_Test.cpp
index 15455208437..12cbabc8cf5 100644
--- a/ACE/tests/Multicast_Test.cpp
+++ b/ACE/tests/Multicast_Test.cpp
@@ -663,7 +663,6 @@ public:
private:
const MCT_Config &config_;
- int iterations_;
};
MCT_Task::MCT_Task (const MCT_Config &config,
diff --git a/ACE/tests/Multicast_Test_IPV6.cpp b/ACE/tests/Multicast_Test_IPV6.cpp
index 079270bb823..e217fa7c497 100644
--- a/ACE/tests/Multicast_Test_IPV6.cpp
+++ b/ACE/tests/Multicast_Test_IPV6.cpp
@@ -666,7 +666,6 @@ public:
private:
const MCT_Config &config_;
- int iterations_;
};
MCT_Task::MCT_Task (const MCT_Config &config,
diff --git a/ACE/tests/Object_Manager_Flipping_Test.cpp b/ACE/tests/Object_Manager_Flipping_Test.cpp
index cafd8ba6a63..572df1a262c 100644
--- a/ACE/tests/Object_Manager_Flipping_Test.cpp
+++ b/ACE/tests/Object_Manager_Flipping_Test.cpp
@@ -15,7 +15,6 @@
*/
//=============================================================================
-
#include "test_config.h"
#include "ace/Object_Manager.h"
#include "ace/OS_Memory.h"
@@ -23,17 +22,8 @@
#include "ace/Service_Config.h"
#include "ace/Intrusive_Auto_Ptr.h"
-
-
static u_int *ip;
-static const bool is_static_object_manager =
-#if defined (ACE_HAS_STATIC_OBJECT_MANAGER)
- true;
-#else
- false;
-#endif
-
extern "C"
void
hook1 (void)
@@ -42,10 +32,8 @@ hook1 (void)
ip = 0;
}
-
int run_main (int, ACE_TCHAR *[])
{
-
// Causing the creation of a SC instance and the corresponding TSS
// key. It is not registered with the Object Manager, but beware -
// OM finalization will destroy it too.
@@ -58,7 +46,6 @@ int run_main (int, ACE_TCHAR *[])
ACE::init ();
ACE_START_TEST (ACE_TEXT ("Object_Manager_Flipping_Test"));
-
// If hook1 never gets called, this will show up as a memory leak.
ACE_NEW_RETURN (ip,
u_int,
diff --git a/ACE/tests/Refcounted_Auto_Ptr_Test.cpp b/ACE/tests/Refcounted_Auto_Ptr_Test.cpp
index 825a9c0e0bb..eec98b893ef 100644
--- a/ACE/tests/Refcounted_Auto_Ptr_Test.cpp
+++ b/ACE/tests/Refcounted_Auto_Ptr_Test.cpp
@@ -71,7 +71,7 @@ class Scheduler : public ACE_Task<ACE_SYNCH>
friend class Method_Request_end;
public:
/// Constructor.
- Scheduler (Scheduler * = 0);
+ Scheduler (void);
//FUZZ: disable check_for_lack_ACE_OS
/// Initializer.
@@ -96,7 +96,6 @@ protected:
private:
// = These are the <Scheduler> implementation details.
ACE_Activation_Queue activation_queue_;
- Scheduler *scheduler_;
};
/**
@@ -107,22 +106,18 @@ private:
class Method_Request_print : public ACE_Method_Request
{
public:
- Method_Request_print (Scheduler *,
- Printer_var &printer);
+ Method_Request_print (Printer_var &printer);
virtual ~Method_Request_print (void);
/// This is the entry point into the Active Object method.
virtual int call (void);
private:
- Scheduler *scheduler_;
Printer_var printer_;
};
-Method_Request_print::Method_Request_print (Scheduler *new_scheduler,
- Printer_var &printer)
- : scheduler_ (new_scheduler),
- printer_ (printer)
+Method_Request_print::Method_Request_print (Printer_var &printer)
+ : printer_ (printer)
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) Method_Request_print created\n")));
@@ -191,8 +186,8 @@ Method_Request_end::call (void)
// Associates the activation queue with this task's message queue,
// allowing easy access to the message queue for shutting it down
// when it's time to stop this object's service threads.
-Scheduler::Scheduler (Scheduler *new_scheduler)
- : activation_queue_ (msg_queue ()), scheduler_ (new_scheduler)
+Scheduler::Scheduler (void)
+ : activation_queue_ (msg_queue ())
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) Scheduler created\n")));
@@ -269,8 +264,7 @@ void
Scheduler::print (Printer_var &printer)
{
this->activation_queue_.enqueue
- (new Method_Request_print (this,
- printer));
+ (new Method_Request_print (printer));
}
// Total number of loops.
@@ -485,7 +479,7 @@ run_main (int, ACE_TCHAR *[])
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) performing asynchronous test...\n")));
- Scheduler *scheduler_ptr;
+ Scheduler *scheduler_ptr = 0;
// Create active objects..
ACE_NEW_RETURN (scheduler_ptr,
diff --git a/ACE/tests/Sendfile_Test.cpp b/ACE/tests/Sendfile_Test.cpp
index 2c239d1a12b..509dea6359e 100644
--- a/ACE/tests/Sendfile_Test.cpp
+++ b/ACE/tests/Sendfile_Test.cpp
@@ -38,8 +38,6 @@ static int Test_Result = 0;
// multiple smaller ones that add up to the large size.
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;
-
static void *
client (void *arg)
diff --git a/ACE/tests/Thread_Attrs_Test.cpp b/ACE/tests/Thread_Attrs_Test.cpp
index ba661bd2c64..8a6f4317e11 100644
--- a/ACE/tests/Thread_Attrs_Test.cpp
+++ b/ACE/tests/Thread_Attrs_Test.cpp
@@ -10,20 +10,11 @@
*/
//=============================================================================
-
#include "test_config.h"
#include "ace/Task.h"
-
-
#if defined (ACE_HAS_THREADS)
-namespace
-{
- // Change this to 'true' if you want lots of debugging messages in the log
- const bool PRINT_DEBUG_MSGS = true;
-}
-
class Cancel_Check : public ACE_Task<ACE_MT_SYNCH>
{
public:
diff --git a/ACE/tests/Thread_Creation_Threshold_Test.cpp b/ACE/tests/Thread_Creation_Threshold_Test.cpp
index bb992df0b73..2a13f4a5aa7 100644
--- a/ACE/tests/Thread_Creation_Threshold_Test.cpp
+++ b/ACE/tests/Thread_Creation_Threshold_Test.cpp
@@ -30,10 +30,8 @@
// Number of iterations to run the test.
#if defined (ACE_VXWORKS)
-const int THREADS_PER_POOL = 50;
const unsigned long MAX_THREAD = 500;
#else
-const int THREADS_PER_POOL = 1000;
# ifdef ACE_FACE_SAFETY_BASE
const unsigned long MAX_THREAD = 10000;
# else