diff options
-rw-r--r-- | ACE/ChangeLog | 13 | ||||
-rw-r--r-- | ACE/ace/ACE.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/OS_NS_netdb.inl | 2 | ||||
-rw-r--r-- | ACE/ace/Stack_Trace.cpp | 4 | ||||
-rw-r--r-- | ACE/examples/Timer_Queue/Custom_Handler.cpp | 8 | ||||
-rw-r--r-- | ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp | 8 |
6 files changed, 26 insertions, 11 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 00927799b5a..344228027db 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,16 @@ +Thu Mar 10 10:37:44 UTC 2011 Vladimir Zykov <vladimir.zykov@prismtech.com> + + * ace/OS_NS_netdb.inl: + * ace/Stack_Trace.cpp: + Fixed warnings on VxWorks. + + * ace/ACE.cpp: + Added a cast for a type that is expected by printf to be long. + + * examples/Timer_Queue/Custom_Handler.cpp: + * examples/Timer_Queue/Thread_Timer_Queue_Test.cpp: + Added casts for arguments to printf as it expects unsigned long. + Thu Mar 10 08:29:30 UTC 2011 Olli Savia <ops@iki.fi> * ace/config-lynxos.h: diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp index f868f6dea1a..22d8bc24bb1 100644 --- a/ACE/ace/ACE.cpp +++ b/ACE/ace/ACE.cpp @@ -2419,7 +2419,7 @@ ACE::timestamp (const ACE_Time_Value& time_value, tms.tm_hour, tms.tm_min, tms.tm_sec, - cur_time.usec()); + static_cast<long> (cur_time.usec())); date_and_time[date_and_timelen - 1] = '\0'; return &date_and_time[11 + (return_pointer_to_first_digit != 0)]; } diff --git a/ACE/ace/OS_NS_netdb.inl b/ACE/ace/OS_NS_netdb.inl index 317875b620e..93d7c17acae 100644 --- a/ACE/ace/OS_NS_netdb.inl +++ b/ACE/ace/OS_NS_netdb.inl @@ -143,6 +143,7 @@ ACE_OS::gethostbyaddr_r (const char *addr, else return (struct hostent *) 0; # elif defined (ACE_VXWORKS) + ACE_UNUSED_ARG (h_errnop); // VxWorks 6.x has a threadsafe gethostbyaddr() which returns a heap-allocated // data structure which needs to be freed with hostentFree() //FUZZ: disable check_for_lack_ACE_OS @@ -333,6 +334,7 @@ ACE_OS::gethostbyname_r (const char *name, else return (struct hostent *) 0; # elif defined (ACE_VXWORKS) + ACE_UNUSED_ARG (h_errnop); // VxWorks 6.x has a threadsafe gethostbyname() which returns a heap-allocated // data structure which needs to be freed with hostentFree() //FUZZ: disable check_for_lack_ACE_OS diff --git a/ACE/ace/Stack_Trace.cpp b/ACE/ace/Stack_Trace.cpp index f5c8577c454..745d9287f11 100644 --- a/ACE/ace/Stack_Trace.cpp +++ b/ACE/ace/Stack_Trace.cpp @@ -197,7 +197,7 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, // See memEdrLib.c in VxWorks RTP sources for an example of stack tracing. -static STATUS ace_vx_rtp_pc_validate (INSTR *pc, TRC_OS_CTX *pOsCtx) +static STATUS ace_vx_rtp_pc_validate (INSTR *pc, TRC_OS_CTX *) { return ALIGNED (pc, sizeof (INSTR)) ? OK : ERROR; } @@ -262,7 +262,7 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, size_t len = ACE_OS::strlen (this->buf_); size_t space = SYMBUFSIZ - len - 1; char *cursor = this->buf_ + len; - size_t written = ACE_OS::snprintf (cursor, space, "%x %s", + size_t written = ACE_OS::snprintf (cursor, space, "%p %s", prevFn, fnName); cursor += written; space -= written; diff --git a/ACE/examples/Timer_Queue/Custom_Handler.cpp b/ACE/examples/Timer_Queue/Custom_Handler.cpp index 161f1fe4e3e..7fede7130c1 100644 --- a/ACE/examples/Timer_Queue/Custom_Handler.cpp +++ b/ACE/examples/Timer_Queue/Custom_Handler.cpp @@ -46,10 +46,10 @@ Custom_Handler::on_timeout (const ACE_Time_Value ¤t_time, ACE_OS::printf ("\nexpiring timer %d at %lu.%7.7lu secs\n" "\tthere was a %lu.%7.7lu secs delay\n", this->id_, - current_time.sec (), - current_time.usec (), - delay.sec (), - delay.usec ()); + static_cast<unsigned long> (current_time.sec ()), + static_cast<unsigned long> (current_time.usec ()), + static_cast<unsigned long> (delay.sec ()), + static_cast<unsigned long> (delay.usec ())); // Notice this delete is protected. delete this; diff --git a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp index 33b4d4a1b70..862b9f94263 100644 --- a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp +++ b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp @@ -57,10 +57,10 @@ Handler::handle_timeout (const ACE_Time_Value ¤t_time, ACE_OS::printf ("\nexpiring timer %d at %lu.%7.7lu secs\n" "\tthere was a %lu.%7.7lu secs delay\n", this->id_, - current_time.sec (), - current_time.usec (), - delay.sec (), - delay.usec ()); + static_cast<unsigned long> (current_time.sec ()), + static_cast<unsigned long> (current_time.usec ()), + static_cast<unsigned long> (delay.sec ()), + static_cast<unsigned long> (delay.usec ())); // Notice this delete is protected. delete this; return 0; |