diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-11-15 21:32:25 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-11-15 21:32:25 +0000 |
commit | 9923419fc5467b0e332c942dc012a390cee69a21 (patch) | |
tree | d1038556f0c918960f732417ad3fc120fbff65eb /tests | |
parent | e475f51608e9415cb7ba76bed408c5346553eb40 (diff) | |
download | ATCD-9923419fc5467b0e332c942dc012a390cee69a21.tar.gz |
ChangeLogTag:Thu Nov 15 08:26:57 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Aio_Platform_Test.cpp | 4 | ||||
-rw-r--r-- | tests/Upgradable_RW_Test.cpp | 23 |
2 files changed, 14 insertions, 13 deletions
diff --git a/tests/Aio_Platform_Test.cpp b/tests/Aio_Platform_Test.cpp index e29a6ce61b9..1add359f631 100644 --- a/tests/Aio_Platform_Test.cpp +++ b/tests/Aio_Platform_Test.cpp @@ -163,10 +163,8 @@ have_asynchio (void) #endif /* _POSIX_ASYNCHRONOUS_IO */ } - - int -main (int, char *[]) +main (int, ACE_TCHAR *[]) { ACE_START_TEST ("Aio_Platform_Test"); diff --git a/tests/Upgradable_RW_Test.cpp b/tests/Upgradable_RW_Test.cpp index 27b68c2b5c2..ae2459cfa4e 100644 --- a/tests/Upgradable_RW_Test.cpp +++ b/tests/Upgradable_RW_Test.cpp @@ -84,7 +84,7 @@ find_last (void) "%d", n_entries - 1); ACE_CString cString (search_string); - Element* element_ptr; + Element *element_ptr = 0; for (ACE_Double_Linked_List_Iterator<Element> iterator (*linked_list_ptr); !iterator.done (); @@ -287,7 +287,10 @@ Time_Calculation ::print_stats (void) elapsed_time.user_time /= iterations; elapsed_time.system_time /= iterations; - double tmp = 1000 / elapsed_time.real_time; + double tmp = 0.0; + + if (elapsed_time.real_time != 0.0) + tmp = 1000 / elapsed_time.real_time; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n") @@ -313,8 +316,8 @@ static int init (void) { char entry[MAX_STRING_SIZE]; - ACE_CString *cString_ptr; - Element *element_ptr; + ACE_CString *cString_ptr = 0; + Element *element_ptr = 0; ACE_NEW_RETURN (linked_list_ptr, Linked_List, @@ -378,10 +381,10 @@ main (int argc, ACE_TCHAR *argv[]) // for a nice start of all threads (for much contention) // Initialize the readers. - Reader_Task** reader_tasks; + Reader_Task **reader_tasks = 0; ACE_NEW_RETURN (reader_tasks, - Reader_Task*[n_readers], + Reader_Task *[n_readers], -1); u_int i; @@ -401,10 +404,10 @@ main (int argc, ACE_TCHAR *argv[]) } // Create all the writers - Writer_Task** writer_tasks; + Writer_Task **writer_tasks = 0; ACE_NEW_RETURN (writer_tasks, - Writer_Task*[n_writers], + Writer_Task *[n_writers], -1); for (i = 0; @@ -454,8 +457,8 @@ main (int argc, ACE_TCHAR *argv[]) ACE_TEXT (" (%t) exiting main thread\n"))); // Delete the memory of the Double_Linked_List - ACE_CString *cString_ptr; - Element *element_ptr; + ACE_CString *cString_ptr = 0; + Element *element_ptr = 0; for (i = 0; i < n_entries; |