summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1996-12-11 00:25:35 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1996-12-11 00:25:35 +0000
commit7786679837dbf18f8f2f2292b1a4d69f2a4cc837 (patch)
treed252969bc911b62d8f9a8260738ce06cbdee5f61 /tests
parentcfee5d9d3f5c7510e909a91559668565566fa5cd (diff)
downloadATCD-7786679837dbf18f8f2f2292b1a4d69f2a4cc837.tar.gz
foo
Diffstat (limited to 'tests')
-rw-r--r--tests/Process_Mutex_Test.cpp4
-rw-r--r--tests/Reader_Writer_Test.cpp36
-rw-r--r--tests/Thread_Manager_Test.cpp6
-rw-r--r--tests/Thread_Pool_Test.cpp6
-rw-r--r--tests/Tokens_Test.cpp2
5 files changed, 11 insertions, 43 deletions
diff --git a/tests/Process_Mutex_Test.cpp b/tests/Process_Mutex_Test.cpp
index cfbec7bf50d..3739420c497 100644
--- a/tests/Process_Mutex_Test.cpp
+++ b/tests/Process_Mutex_Test.cpp
@@ -110,7 +110,9 @@ main (int argc, char *argv[])
// Spawn ACE_MAX_ITERATIONS processes which will contend for the lock
ACE_Process servers[ACE_MAX_ITERATIONS];
- for (int i = 0; i < ACE_MAX_ITERATIONS; i++)
+ int i;
+
+ for (i = 0; i < ACE_MAX_ITERATIONS; i++)
{
ACE_ASSERT (servers[i].start (s_argv) != -1);
diff --git a/tests/Reader_Writer_Test.cpp b/tests/Reader_Writer_Test.cpp
index 3b4dfbead1d..ce3797e2fd6 100644
--- a/tests/Reader_Writer_Test.cpp
+++ b/tests/Reader_Writer_Test.cpp
@@ -1,6 +1,6 @@
-// ============================================================================
// $Id$
+// ============================================================================
//
// = LIBRARY
// tests
@@ -40,7 +40,7 @@ static size_t n_readers = 6;
static size_t n_writers = 4;
// Thread id of last writer.
-volatile static int shared_data;
+static volatile int shared_data;
// Lock for shared_data.
static ACE_RW_Mutex rw_mutex;
@@ -57,36 +57,6 @@ print_usage_and_die (void)
ACE_OS::exit (1);
}
-// Parse the command-line arguments and set options.
-
-static void
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opt (argc, argv, "r:w:n:l:");
-
- int c;
-
- while ((c = get_opt ()) != -1)
- switch (c)
- {
- case 'r':
- n_readers = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'w':
- n_writers = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'n':
- n_iterations = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'l':
- n_loops = ACE_OS::atoi (get_opt.optarg);
- break;
- default:
- print_usage_and_die ();
- break;
- }
-}
-
// Iterate <n_iterations> each time checking that nobody modifies the data
// while we have a read lock.
@@ -176,7 +146,7 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, int>;
// Spawn off threads.
-int main (int, char *argv[])
+int main (int, char *[])
{
ACE_START_TEST ("Reader_Writer_Test");
diff --git a/tests/Thread_Manager_Test.cpp b/tests/Thread_Manager_Test.cpp
index b20e2cd5b6e..b40c4cc2973 100644
--- a/tests/Thread_Manager_Test.cpp
+++ b/tests/Thread_Manager_Test.cpp
@@ -62,7 +62,7 @@ static const int DEFAULT_ITERATIONS = 100000;
#endif /* ACE_HAS_THREADS */
int
-main (int argc, char *argv[])
+main (int, char *[])
{
ACE_START_TEST ("Thread_Manager_Test");
@@ -72,8 +72,8 @@ main (int argc, char *argv[])
// Register a signal handler.
ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT);
- int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS;
- int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS;
+ int n_threads = DEFAULT_THREADS;
+ int n_iterations = DEFAULT_ITERATIONS;
ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr ();
diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp
index 8d7c654c4a3..cb7d9069b9a 100644
--- a/tests/Thread_Pool_Test.cpp
+++ b/tests/Thread_Pool_Test.cpp
@@ -85,7 +85,6 @@ Thread_Pool::svc (void)
// Note that the ACE_Task::svc_run () method automatically adds us to
// the Thread_Manager when the thread begins.
- int result = 0;
int count = 1;
// Keep looping, reading a message out of the queue, until we get a
@@ -190,14 +189,13 @@ produce (Thread_Pool &thread_pool)
#endif /* ACE_HAS_THREADS */
int
-main (int argc, char *[])
+main (int, char *[])
{
ACE_START_TEST ("Thread_Pool_Test");
#if defined (ACE_HAS_THREADS)
int n_threads = ACE_MAX_THREADS;
- ACE_DEBUG ((LM_DEBUG, "(%t) argc = %d, threads = %d\n",
- argc, n_threads));
+ ACE_DEBUG ((LM_DEBUG, "(%t) threads = %d\n", n_threads));
// Create the worker tasks.
Thread_Pool thread_pool (ACE_Service_Config::thr_mgr (),
diff --git a/tests/Tokens_Test.cpp b/tests/Tokens_Test.cpp
index 5e22c657c1f..6e40ddf498f 100644
--- a/tests/Tokens_Test.cpp
+++ b/tests/Tokens_Test.cpp
@@ -58,8 +58,6 @@ run_thread (void *vp)
ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ());
ACE_NEW_THREAD;
Test_Params *tp = (Test_Params *) vp;
- const char *name1 = tp->token1_->name ();
- const char *name2 = tp->token2_->name ();
ACE_Token_Collection collection (1, tp->collection_name_);
collection.insert (*(tp->token1_));
collection.insert (*(tp->token2_));