diff options
-rw-r--r-- | TAO/ChangeLog | 27 | ||||
-rw-r--r-- | TAO/examples/Load_Balancing/Load_Balancer_i.cpp | 2 | ||||
-rw-r--r-- | TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp | 2 | ||||
-rw-r--r-- | TAO/examples/Logging/Logging_Test_i.cpp | 2 | ||||
-rw-r--r-- | TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp | 2 | ||||
-rw-r--r-- | TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp | 2 | ||||
-rw-r--r-- | TAO/examples/RTScheduling/Job_i.cpp | 6 | ||||
-rw-r--r-- | TAO/examples/RTScheduling/Starter.cpp | 4 | ||||
-rw-r--r-- | TAO/examples/Simple/time-date/Time_Date_i.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/examples/ImR/Advanced/TestClient.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/examples/RtEC/Kokyu/Service.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/RTCP.cpp | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/media_timer.cpp | 7 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event/Basic/Observer.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Interoperable_Naming/ncontextext_client_i.cpp | 2 |
17 files changed, 54 insertions, 22 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 335487f36c7..f81f94894f9 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,30 @@ +Wed Jun 18 14:15:04 UTC 2008 Chad Elliott <elliott_c@ociweb.com> + + * examples/Load_Balancing/Load_Balancer_i.cpp: + * examples/Load_Balancing_persistent/Load_Balancer_i.cpp: + * examples/Logging/Logging_Test_i.cpp: + * examples/OBV/Typed_Events/Event_Types_impl.cpp: + * orbsvcs/tests/Event/Basic/Observer.cpp: + * orbsvcs/tests/ImplRepo/airplane_i.cpp: + * orbsvcs/tests/Interoperable_Naming/ncontextext_client_i.cpp: + * examples/RTScheduling/Job_i.cpp: + * examples/RTScheduling/Starter.cpp: + * examples/Simple/time-date/Time_Date_i.cpp: + * orbsvcs/ImplRepo_Service/Locator_Options.cpp: + * orbsvcs/examples/ImR/Advanced/TestClient.cpp: + * orbsvcs/examples/RtEC/Kokyu/Service.cpp: + + Added static_cast's to avoid warnings from vc8. + + * examples/PluggableUDP/tests/SimplePerformance/client.cpp: + + Use the correct type to avoid warnings from vc8. + + * orbsvcs/orbsvcs/AV/RTCP.cpp: + * orbsvcs/orbsvcs/AV/media_timer.cpp: + + Added truncate_cast's to avoid warnings from vc8. + Wed Jun 18 13:50:00 UTC 2008 Simon Massey <sma at prismtech dot com> * examples/Buffered_AMI/client.cpp: diff --git a/TAO/examples/Load_Balancing/Load_Balancer_i.cpp b/TAO/examples/Load_Balancing/Load_Balancer_i.cpp index 7211d5964e1..68b6ee04e6d 100644 --- a/TAO/examples/Load_Balancing/Load_Balancer_i.cpp +++ b/TAO/examples/Load_Balancing/Load_Balancer_i.cpp @@ -314,7 +314,7 @@ Random_Object_Group::Random_Object_Group (const char *id, : Object_Group_i (id, my_factory) { // Seed the random number generator. - ACE_OS::srand (ACE_OS::time ()); + ACE_OS::srand (static_cast<u_int> (ACE_OS::time ())); } Random_Object_Group::~Random_Object_Group (void) diff --git a/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp b/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp index 8d0331735d5..498c68995e9 100644 --- a/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp +++ b/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp @@ -879,7 +879,7 @@ Random_Object_Group::Random_Object_Group (const char *id, : Object_Group_i (id, poa) { // Seed the random number generator. - ACE_OS::srand (ACE_OS::time ()); + ACE_OS::srand (static_cast<u_int> (ACE_OS::time ())); } char * diff --git a/TAO/examples/Logging/Logging_Test_i.cpp b/TAO/examples/Logging/Logging_Test_i.cpp index f8dc3a45c12..c52ea071119 100644 --- a/TAO/examples/Logging/Logging_Test_i.cpp +++ b/TAO/examples/Logging/Logging_Test_i.cpp @@ -311,7 +311,7 @@ Logger_Client::init_record (Logger::Log_Record &newrec, ACE_Time_Value time (ACE_OS::gettimeofday ()); //FUZZ: enable check_for_lack_ACE_OS - newrec.time = time.sec (); + newrec.time = static_cast<CORBA::Long> (time.sec ()); // Get and store the PID of the calling process. pid_t pid = ACE_OS::getpid (); diff --git a/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp b/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp index a1169f57cca..a4c6565f55c 100644 --- a/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp +++ b/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp @@ -11,7 +11,7 @@ Event_impl::Event_impl () { // Put a timestamp on event's birth. ACE_Time_Value now (ACE_OS::gettimeofday ()); - this->time_ (now.sec ()); + this->time_ (static_cast<CORBA::Long> (now.sec ())); } Event_impl::~Event_impl () diff --git a/TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp b/TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp index b2c5b220a1f..0cf79f7e6a2 100644 --- a/TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp +++ b/TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp @@ -156,7 +156,7 @@ Client::svc (void) //ACE_DEBUG ((LM_DEBUG, "...finished\n")); - long dur = measured.sec () * 1000000 + measured.usec (); + time_t dur = measured.sec () * 1000000 + measured.usec (); if (dur == 0) ACE_DEBUG ((LM_DEBUG, "Time not measurable, calculation skipped\n")); else diff --git a/TAO/examples/RTScheduling/Job_i.cpp b/TAO/examples/RTScheduling/Job_i.cpp index 791035aaad4..46d812d130d 100644 --- a/TAO/examples/RTScheduling/Job_i.cpp +++ b/TAO/examples/RTScheduling/Job_i.cpp @@ -92,7 +92,8 @@ Job_i::work (CORBA::ULong work, // ACE_hrtime_t now = ACE_OS::gethrtime (); ACE_Time_Value run_time = ACE_OS::gettimeofday () - *(dt_creator_->base_time ()); - TASK_STATS::instance ()->sample (run_time.sec (), guid_); + TASK_STATS::instance ()->sample ( + static_cast<ACE_UINT32> (run_time.sec ()), guid_); ACE_Time_Value count_down_time (1); ACE_Countdown_Time count_down (&count_down_time); @@ -106,7 +107,8 @@ Job_i::work (CORBA::ULong work, } run_time = ACE_OS::gettimeofday () - *(dt_creator_->base_time ()); - TASK_STATS::instance ()->sample (run_time.sec (), guid_); + TASK_STATS::instance ()->sample ( + static_cast<ACE_UINT32> (run_time.sec ()), guid_); CORBA::Policy_var sched_param; sched_param = CORBA::Policy::_duplicate (dt_creator_->sched_param (importance)); diff --git a/TAO/examples/RTScheduling/Starter.cpp b/TAO/examples/RTScheduling/Starter.cpp index b227a7970a4..e8b9eeb82d9 100644 --- a/TAO/examples/RTScheduling/Starter.cpp +++ b/TAO/examples/RTScheduling/Starter.cpp @@ -29,7 +29,7 @@ Starter::fire (void) iterator != this->synchs_.end (); ++iterator) { - (*iterator).int_id_.in ()->go (base_time.sec ()); + (*iterator).int_id_.in ()->go (static_cast<CORBA::Long> (base_time.sec ())); } } @@ -109,7 +109,7 @@ Starter::add_to_synchs (CosNaming::BindingList &binding_list) Synch::_narrow (obj.in ()); - synch_obj->go (base_time.sec ()); + synch_obj->go (static_cast<CORBA::Long> (base_time.sec ())); // // Add this receiver to the receiver map. // this->synchs_.bind (synch_name, diff --git a/TAO/examples/Simple/time-date/Time_Date_i.cpp b/TAO/examples/Simple/time-date/Time_Date_i.cpp index f2996be3ecd..558436edc06 100644 --- a/TAO/examples/Simple/time-date/Time_Date_i.cpp +++ b/TAO/examples/Simple/time-date/Time_Date_i.cpp @@ -9,7 +9,7 @@ void Time_Date_i::bin_date (CORBA::Long_out time_date) { - time_date = ACE_OS::time (0); + time_date = static_cast<CORBA::Long> (ACE_OS::time (0)); } // Obtain the time and date in string format. diff --git a/TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp b/TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp index 0147cecfb8c..0d9dbefe97c 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Locator_Options.cpp @@ -306,7 +306,7 @@ Options::save_registry_options () (LPBYTE) &tmp, sizeof (DWORD)); ACE_ASSERT (err == ERROR_SUCCESS); - tmp = this->startup_timeout_.sec(); + tmp = static_cast<DWORD> (this->startup_timeout_.sec()); err = ACE_TEXT_RegSetValueEx (key, "Timeout", 0, REG_DWORD, (LPBYTE) &tmp, sizeof (DWORD)); ACE_ASSERT (err == ERROR_SUCCESS); diff --git a/TAO/orbsvcs/examples/ImR/Advanced/TestClient.cpp b/TAO/orbsvcs/examples/ImR/Advanced/TestClient.cpp index 8b1325cc13c..63a9ad16eba 100644 --- a/TAO/orbsvcs/examples/ImR/Advanced/TestClient.cpp +++ b/TAO/orbsvcs/examples/ImR/Advanced/TestClient.cpp @@ -167,7 +167,7 @@ int TestClient::svc() ACE_TString currentIOR; - ACE_OS::srand(ACE_OS::time()); + ACE_OS::srand(static_cast<u_int> (ACE_OS::time())); try { diff --git a/TAO/orbsvcs/examples/RtEC/Kokyu/Service.cpp b/TAO/orbsvcs/examples/RtEC/Kokyu/Service.cpp index 9654858f777..71e3e950311 100644 --- a/TAO/orbsvcs/examples/RtEC/Kokyu/Service.cpp +++ b/TAO/orbsvcs/examples/RtEC/Kokyu/Service.cpp @@ -32,7 +32,7 @@ namespace inline RtecScheduler::Period_t time_val_to_period (const ACE_Time_Value &tv) { //100s of nanoseconds - return (tv.sec () * 1000000 + tv.usec ())*10; + return static_cast<RtecScheduler::Period_t> (tv.sec () * 1000000 + tv.usec ())*10; } int parse_args (int argc, char *argv[]); diff --git a/TAO/orbsvcs/orbsvcs/AV/RTCP.cpp b/TAO/orbsvcs/orbsvcs/AV/RTCP.cpp index 08122cb583a..8ca183f7ca0 100644 --- a/TAO/orbsvcs/orbsvcs/AV/RTCP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/RTCP.cpp @@ -43,6 +43,7 @@ #include "orbsvcs/AV/RTCP_Packet.h" #include "ace/OS_NS_time.h" #include "ace/OS_NS_strings.h" +#include "ace/Truncate.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -277,7 +278,7 @@ TAO_AV_RTCP::rtcp_interval (int members, if (initial) { // initialize the random number generator - ACE_OS::srand(ACE_OS::time(0L)); + ACE_OS::srand(ACE_Utils::truncate_cast<u_int> (ACE_OS::time(0L))); rtcp_min_time /= 2; *avg_rtcp_size = 128; @@ -591,8 +592,9 @@ TAO_AV_RTCP_Callback::send_report (int bye) // get the NTP timestamp ACE_Time_Value unix_now = ACE_OS::gettimeofday (); TAO_AV_RTCP::ntp64 ntp_now = ntp64time (unix_now); - ACE_UINT32 rtp_ts = unix_now.sec () * 8000 + unix_now.usec () / 125 + - this->timestamp_offset_; + ACE_UINT32 rtp_ts = ACE_Utils::truncate_cast<ACE_UINT32> ( + unix_now.sec () * 8000 + unix_now.usec () / 125 + + this->timestamp_offset_); ACE_NEW_RETURN(cp, RTCP_SR_Packet (my_ssrc, ntp_now.upper, diff --git a/TAO/orbsvcs/orbsvcs/AV/media_timer.cpp b/TAO/orbsvcs/orbsvcs/AV/media_timer.cpp index 1a5b9cd1e42..811e17c4f63 100644 --- a/TAO/orbsvcs/orbsvcs/AV/media_timer.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/media_timer.cpp @@ -41,6 +41,7 @@ static const char rcsid[] = #include "ace/Time_Value.h" #include "ace/OS_NS_sys_time.h" #include "ace/OS_NS_stdlib.h" +#include "ace/Truncate.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -73,9 +74,9 @@ ACE_UINT32 MediaTimer::media_ts() ACE_Time_Value tv = ACE_OS::gettimeofday(); ACE_UINT32 u = tv.usec (); u = (u << 3) + u; /* x 9 */ - /* sec * 90Khz + (usec * 90Khz) / 1e6 */ - u = tv.sec () * 90000 + (u / 100); - return (u + offset_); + /* sec * 90Khz + (usec * 90Khz) / 1e6 */ + u = ACE_Utils::truncate_cast<ACE_UINT32> (tv.sec () * 90000 + (u / 100)); + return (u + offset_); } /* diff --git a/TAO/orbsvcs/tests/Event/Basic/Observer.cpp b/TAO/orbsvcs/tests/Event/Basic/Observer.cpp index e7d5a1bba3f..7265e2d0851 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Observer.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Observer.cpp @@ -48,7 +48,7 @@ EC_Master::run (int argc, char* argv[]) // test. ACE_High_Res_Timer::calibrate (); - this->seed_ = ACE_OS::time (0); + this->seed_ = static_cast<ACE_RANDR_TYPE> (ACE_OS::time (0)); this->initialize_orb_and_poa (argc, argv); diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp index 725220e589e..34a220acb2b 100644 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp @@ -14,7 +14,7 @@ ACE_RCSID (ImplRepo, Airplane_i::Airplane_i () { // Seed the random number generator - ACE_OS::srand (ACE_OS::time (0L)); + ACE_OS::srand (static_cast<u_int> (ACE_OS::time (0L))); } diff --git a/TAO/orbsvcs/tests/Interoperable_Naming/ncontextext_client_i.cpp b/TAO/orbsvcs/tests/Interoperable_Naming/ncontextext_client_i.cpp index cbeb4324271..a63d7fe9f22 100644 --- a/TAO/orbsvcs/tests/Interoperable_Naming/ncontextext_client_i.cpp +++ b/TAO/orbsvcs/tests/Interoperable_Naming/ncontextext_client_i.cpp @@ -80,7 +80,7 @@ NContextExt_Client_i::get_name () { // USe time (NULL) to produce the seed: - ACE_OS::srand (ACE_OS::time (0)); + ACE_OS::srand (static_cast<u_int> (ACE_OS::time (0))); const int len = 10; char *name_component = CORBA::string_alloc (len); |