summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-05-06 14:19:49 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-05-06 14:19:49 +0000
commita060dadc8957e1e9b4926a06ca6084b357d850b7 (patch)
tree4268a6dcb8728f0000c0201cb7b42270e85ec335 /tests
parent39a0abce9f97eb5c711ceb6960f5aa356bd17353 (diff)
downloadATCD-a060dadc8957e1e9b4926a06ca6084b357d850b7.tar.gz
ChangeLogTag: Tue May 6 09:19:07 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/MT_Reactor_Timer_Test.cpp9
-rw-r--r--tests/RMCast/RMCast_Fragment_Test.cpp4
-rw-r--r--tests/RMCast/RMCast_Reassembly_Test.cpp17
-rw-r--r--tests/Reactor_Timer_Test.cpp9
-rw-r--r--tests/Service_Config_Test.cpp2
-rw-r--r--tests/Thread_Manager_Test.cpp2
6 files changed, 25 insertions, 18 deletions
diff --git a/tests/MT_Reactor_Timer_Test.cpp b/tests/MT_Reactor_Timer_Test.cpp
index f9f5b2b3c24..01e6422ce81 100644
--- a/tests/MT_Reactor_Timer_Test.cpp
+++ b/tests/MT_Reactor_Timer_Test.cpp
@@ -122,7 +122,8 @@ int
Time_Handler::handle_timeout (const ACE_Time_Value &tv,
const void *arg)
{
- long time_tag = ACE_reinterpret_cast (long, arg);
+ long time_tag = ACE_static_cast (long,
+ ACE_reinterpret_cast (size_t, arg));
ACE_UNUSED_ARG(tv);
ACE_GUARD_RETURN (ACE_Thread_Mutex, id_lock, this->lock_, 0);
@@ -242,7 +243,8 @@ Dispatch_Count_Handler::handle_timeout (const ACE_Time_Value &tv,
++this->timers_fired_;
- long value = ACE_reinterpret_cast (long, arg);
+ long value = ACE_static_cast (long,
+ ACE_reinterpret_cast (size_t, arg));
// This case just tests to make sure the Reactor is counting timer
// expiration correctly.
@@ -278,7 +280,8 @@ ACE_TMAIN (int, ACE_TCHAR *[])
for (int i = ACE_MAX_TIMERS; i > 0; i--)
// Schedule a timeout to expire immediately.
if (r->schedule_timer (&callback,
- ACE_reinterpret_cast (const void *, i),
+ ACE_reinterpret_cast (const void *,
+ ACE_static_cast (size_t, i)),
ACE_Time_Value (0)) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%p\n"),
diff --git a/tests/RMCast/RMCast_Fragment_Test.cpp b/tests/RMCast/RMCast_Fragment_Test.cpp
index d6c750e6e09..dda82d4303d 100644
--- a/tests/RMCast/RMCast_Fragment_Test.cpp
+++ b/tests/RMCast/RMCast_Fragment_Test.cpp
@@ -276,7 +276,7 @@ ACE_RMCast_Fragment_Tester::data (ACE_RMCast::Data &data)
ACE_OS::memcpy (this->received_.rd_ptr () + offset,
mb->rd_ptr (),
payload_size);
- this->received_bytes_ += payload_size;
+ this->received_bytes_ += ACE_static_cast (ACE_UINT32, payload_size);
offset += payload_size;
}
@@ -288,7 +288,7 @@ ACE_RMCast_Fragment_Tester::data (ACE_RMCast::Data &data)
fragment_size += payload_size;
ACE_OS::memcpy (this->received_.rd_ptr () + offset,
i->rd_ptr (), payload_size);
- this->received_bytes_ += payload_size;
+ this->received_bytes_ += ACE_static_cast (ACE_UINT32, payload_size);
offset += payload_size;
}
diff --git a/tests/RMCast/RMCast_Reassembly_Test.cpp b/tests/RMCast/RMCast_Reassembly_Test.cpp
index 0877ec4818b..c3a8287e3cf 100644
--- a/tests/RMCast/RMCast_Reassembly_Test.cpp
+++ b/tests/RMCast/RMCast_Reassembly_Test.cpp
@@ -108,8 +108,9 @@ ACE_RMCast_Reassembly_Tester::svc (void)
for (size_t offset = 0; offset < n; offset += fragment_size)
{
if (this->put_fragment (sequence_number,
- offset,
- fragment_size,
+ ACE_static_cast (ACE_UINT32, offset),
+ ACE_static_cast (ACE_UINT32,
+ fragment_size),
&big_blob) == -1)
{
ACE_DEBUG ((LM_DEBUG,
@@ -156,8 +157,9 @@ ACE_RMCast_Reassembly_Tester::svc (void)
offset = n/2;
}
if (this->put_fragment (sequence_number,
- offset,
- fragment_size,
+ ACE_static_cast (ACE_UINT32, offset),
+ ACE_static_cast (ACE_UINT32,
+ fragment_size),
&big_blob) == -1)
{
ACE_DEBUG ((LM_DEBUG,
@@ -169,8 +171,9 @@ ACE_RMCast_Reassembly_Tester::svc (void)
for (size_t offset = 0; offset < n; offset += fragment_size)
{
if (this->put_fragment (sequence_number,
- offset,
- fragment_size,
+ ACE_static_cast (ACE_UINT32, offset),
+ ACE_static_cast (ACE_UINT32,
+ fragment_size),
&big_blob) == -1)
{
ACE_DEBUG ((LM_DEBUG,
@@ -285,7 +288,7 @@ ACE_RMCast_Reassembly_Tester::put_fragment (ACE_UINT32 sequence_number,
ACE_RMCast::Data data;
data.sequence_number = sequence_number;
- data.total_size = total_length;
+ data.total_size = ACE_static_cast (ACE_UINT32, total_length);
data.fragment_offset = offset;
data.payload = &p;
return this->reassembly_.data (data);
diff --git a/tests/Reactor_Timer_Test.cpp b/tests/Reactor_Timer_Test.cpp
index 9d33711383a..b8b633f260e 100644
--- a/tests/Reactor_Timer_Test.cpp
+++ b/tests/Reactor_Timer_Test.cpp
@@ -79,7 +79,8 @@ int
Time_Handler::handle_timeout (const ACE_Time_Value &tv,
const void *arg)
{
- long current_count = ACE_reinterpret_cast (long, arg);
+ long current_count = ACE_static_cast (long,
+ ACE_reinterpret_cast (size_t, arg));
if (current_count >= 0)
ACE_ASSERT (current_count == count);
@@ -129,7 +130,7 @@ test_registering_all_handlers (void)
Time_Handler rt[ACE_MAX_TIMERS];
int t_id[ACE_MAX_TIMERS];
- for (u_long i = 0; i < ACE_MAX_TIMERS; i++)
+ for (size_t i = 0; i < ACE_MAX_TIMERS; i++)
{
t_id[i] =
ACE_Reactor::instance ()->schedule_timer (&rt[i],
@@ -155,7 +156,7 @@ test_registering_one_handler (void)
done = 0;
count = 0;
- for (u_long i = 0; (u_long) i < ACE_MAX_TIMERS; i++)
+ for (size_t i = 0; i < ACE_MAX_TIMERS; i++)
{
t_id[i] =
ACE_Reactor::instance ()->schedule_timer (&rt[0],
@@ -181,7 +182,7 @@ test_canceling_odd_timers (void)
count = 1;
odd = 1;
- for (u_long i = 0; i < ACE_MAX_TIMERS; i++)
+ for (size_t i = 0; i < ACE_MAX_TIMERS; i++)
{
t_id[i] = ACE_Reactor::instance ()->schedule_timer (&rt[i],
(const void *) i,
diff --git a/tests/Service_Config_Test.cpp b/tests/Service_Config_Test.cpp
index 7632415a6d7..fac94f1f296 100644
--- a/tests/Service_Config_Test.cpp
+++ b/tests/Service_Config_Test.cpp
@@ -82,7 +82,7 @@ Test_Singleton::instance (u_short variety)
ACE_Object_Manager::at_exit (instances[variety],
test_singleton_cleanup,
ACE_reinterpret_cast (void *,
- ACE_static_cast (u_long, variety)));
+ ACE_static_cast (size_t, variety)));
return instances[variety];
}
diff --git a/tests/Thread_Manager_Test.cpp b/tests/Thread_Manager_Test.cpp
index 424936639ee..fac7af88265 100644
--- a/tests/Thread_Manager_Test.cpp
+++ b/tests/Thread_Manager_Test.cpp
@@ -255,7 +255,7 @@ ACE_TMAIN (int, ACE_TCHAR *[])
int status = 0;
#if defined (ACE_HAS_THREADS)
- int n_iterations = DEFAULT_ITERATIONS;
+ size_t n_iterations = DEFAULT_ITERATIONS;
u_int i;