diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-11-10 18:58:26 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-11-10 18:58:26 +0000 |
commit | 3c84e3836b3abfab542a7be40203dfdb2b6a1b8d (patch) | |
tree | bb9f565d02cf35dba707c8976e89ba97749e5b0c /tests | |
parent | c6f8c1fb06c57e454694764a7005c68ce47b3a65 (diff) | |
download | ATCD-3c84e3836b3abfab542a7be40203dfdb2b6a1b8d.tar.gz |
Hi David ;-)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CPP_Test.cpp | 4 | ||||
-rw-r--r-- | tests/Mem_Map_Test.cpp | 2 | ||||
-rw-r--r-- | tests/SPIPE_Test.cpp | 4 | ||||
-rw-r--r-- | tests/Shared_Memory_MM_Test.cpp | 13 | ||||
-rw-r--r-- | tests/TSS_Test.cpp | 8 | ||||
-rw-r--r-- | tests/Time_Service_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Timer_Queue_Test.cpp | 5 | ||||
-rw-r--r-- | tests/test_config.h | 1 |
8 files changed, 22 insertions, 17 deletions
diff --git a/tests/CPP_Test.cpp b/tests/CPP_Test.cpp index 2696e045b3d..b12d696c861 100644 --- a/tests/CPP_Test.cpp +++ b/tests/CPP_Test.cpp @@ -38,7 +38,7 @@ static int timeout = ACE_DEFAULT_TIMEOUT; static ACE_Thread_Manager thr_mgr; static void * -client (void *dummy) +client (void *) { #if defined (ACE_WIN32) // Insert thread into thr_mgr @@ -104,7 +104,7 @@ client (void *dummy) } static void * -server (void *dummy) +server (void *) { #if defined (ACE_WIN32) // Insert thread into thr_mgr diff --git a/tests/Mem_Map_Test.cpp b/tests/Mem_Map_Test.cpp index ec630a4905a..387f3e3da63 100644 --- a/tests/Mem_Map_Test.cpp +++ b/tests/Mem_Map_Test.cpp @@ -85,7 +85,7 @@ create_test_file () } int -main (int argc, char **argv) +main (int, char **argv) { ACE_START_TEST; diff --git a/tests/SPIPE_Test.cpp b/tests/SPIPE_Test.cpp index 7710bcc3564..ef7fb564f67 100644 --- a/tests/SPIPE_Test.cpp +++ b/tests/SPIPE_Test.cpp @@ -37,7 +37,7 @@ static char *pipe_name = "acepipe"; static ACE_Thread_Manager thr_mgr; static void * -client (void *dummy) +client (void *) { #if defined (ACE_WIN32) ACE_Thread_Control thread_control (&thr_mgr); // Insert thread into thr_mgr @@ -66,7 +66,7 @@ client (void *dummy) } static void * -server (void *dummy) +server (void *) { #if defined (ACE_WIN32) ACE_Thread_Control thread_control (&thr_mgr); // Insert thread into thr_mgr diff --git a/tests/Shared_Memory_MM_Test.cpp b/tests/Shared_Memory_MM_Test.cpp index 54b585c1458..9634e421a5c 100644 --- a/tests/Shared_Memory_MM_Test.cpp +++ b/tests/Shared_Memory_MM_Test.cpp @@ -33,7 +33,7 @@ static char shm_key[] = "/tmp/fooXXXXXX"; static ACE_Thread_Manager thr_mgr; static void * -client (void *dummy) +client (void *) { #if defined (ACE_WIN32) // Insert thread into thr_mgr @@ -43,7 +43,8 @@ client (void *dummy) ACE_OS::sleep (3); char t = 'a'; - ACE_Shared_Memory *shm_client = new ACE_Shared_Memory_MM (shm_key); + ACE_Shared_Memory *shm_client; + ACE_NEW_RETURN (shm_client, ACE_Shared_Memory_MM (shm_key), 0); char *shm = (char *) shm_client->malloc (); for (char *s = shm; *s != '\0'; s++) @@ -59,7 +60,7 @@ client (void *dummy) } static void * -server (void *dummy) +server (void *) { #if defined (ACE_WIN32) // Insert thread into thr_mgr @@ -67,9 +68,11 @@ server (void *dummy) ACE_NEW_THREAD; #endif - ACE_Shared_Memory *shm_server = new ACE_Shared_Memory_MM (shm_key, SHMSZ); + ACE_Shared_Memory *shm_server; + ACE_NEW_RETURN (shm_server, ACE_Shared_Memory_MM (shm_key, SHMSZ), 0); + char *shm = (char *) shm_server->malloc (); - char *s = shm; + char *s = shm; for (char c = 'a'; c <= 'z'; c++) *s++ = c; diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp index 81e527de54b..37a6d1428c0 100644 --- a/tests/TSS_Test.cpp +++ b/tests/TSS_Test.cpp @@ -188,16 +188,16 @@ handler (int signum) } int -main (int argc, char *argv[]) +main (int, char *argv[]) { ACE_START_TEST; ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - int threads = ACE_MAX_THREADS; - - signal (SIGINT, ACE_SignalHandler (handler)); + ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); #if defined (ACE_HAS_THREADS) + int threads = ACE_MAX_THREADS; + if (ACE_Service_Config::thr_mgr ()->spawn_n (threads, ACE_THR_FUNC (&worker), (void *) iterations, diff --git a/tests/Time_Service_Test.cpp b/tests/Time_Service_Test.cpp index e6c24a8b068..5f54f9401f8 100644 --- a/tests/Time_Service_Test.cpp +++ b/tests/Time_Service_Test.cpp @@ -27,7 +27,7 @@ #include "ace/Process.h" int -main (int argc, char *argv[]) +main (int, char *argv[]) { ACE_START_TEST; diff --git a/tests/Timer_Queue_Test.cpp b/tests/Timer_Queue_Test.cpp index fc6391f959a..956e4f38faa 100644 --- a/tests/Timer_Queue_Test.cpp +++ b/tests/Timer_Queue_Test.cpp @@ -26,7 +26,8 @@ class Example_Handler : public ACE_Event_Handler { public: - virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg) + virtual int handle_timeout (const ACE_Time_Value &, + const void *arg) { ACE_ASSERT ((int) arg == 42); return 0; @@ -34,7 +35,7 @@ public: }; int -main (int argc, char *argv[]) +main (int, char *argv[]) { ACE_START_TEST; diff --git a/tests/test_config.h b/tests/test_config.h index 808a5e9d1bd..44d11017577 100644 --- a/tests/test_config.h +++ b/tests/test_config.h @@ -62,6 +62,7 @@ public: ACE_Log_Msg::instance()->msg_ostream (this->output_file_); ACE_Log_Msg::instance()->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER); ACE_Log_Msg::instance()->set_flags (ACE_Log_Msg::OSTREAM); + return 0; } ofstream *output_file (void) |