From b95d4aa85049d0046f893b2c3ca8e2666f8946a3 Mon Sep 17 00:00:00 2001 From: parsons Date: Fri, 16 Jul 1999 02:03:28 +0000 Subject: Fixes for readability and new egcs warnings. --- TAO/TAO_IDL/be/be_helper.cpp | 4 ++-- TAO/TAO_IDL/be/be_sequence.cpp | 10 ++++++---- TAO/TAO_IDL/be/be_sunsoft.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 9483cac3d19..c4ec5e1918a 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -315,7 +315,7 @@ TAO_OutStream::operator<< (const ACE_CDR::Short num) TAO_OutStream & TAO_OutStream::operator<< (const ACE_CDR::ULong num) { - ACE_OS::fprintf (this->fp_, "%lu", num); + ACE_OS::fprintf (this->fp_, "%lu", (unsigned long) num); ACE_OS::fflush (fp_); return *this; } @@ -323,7 +323,7 @@ TAO_OutStream::operator<< (const ACE_CDR::ULong num) TAO_OutStream & TAO_OutStream::operator<< (const ACE_CDR::Long num) { - ACE_OS::fprintf (this->fp_, "%ld", num); + ACE_OS::fprintf (this->fp_, "%ld", (long) num); ACE_OS::fflush (fp_); return *this; } diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp index 5d88dabd8ac..321f770455a 100644 --- a/TAO/TAO_IDL/be/be_sequence.cpp +++ b/TAO/TAO_IDL/be/be_sequence.cpp @@ -106,8 +106,10 @@ be_sequence::gen_name (void) // append the size (if any) if (!this->unbounded_) { - ACE_OS::sprintf (namebuf, "%s_%d", namebuf, this->max_size ()->ev - ()->u.ulval); + ACE_OS::sprintf (namebuf, + "%s_%lu", + namebuf, + this->max_size ()->ev ()->u.ulval); } return ACE_OS::strdup (namebuf); } @@ -279,7 +281,7 @@ be_sequence::instance_name () this->flatname()); else ACE_OS::sprintf (namebuf, - "_TAO_Bounded_Object_Sequence_%s_%d", + "_TAO_Bounded_Object_Sequence_%s_%lu", this->flatname(), this->max_size ()->ev()->u.ulval); break; @@ -313,7 +315,7 @@ be_sequence::instance_name () } else ACE_OS::sprintf (namebuf, - "_TAO_Bounded_Sequence_%s_%d", + "_TAO_Bounded_Sequence_%s_%lu", this->flatname(), //prim_type->flatname (), this->max_size()->ev()->u.ulval); diff --git a/TAO/TAO_IDL/be/be_sunsoft.cpp b/TAO/TAO_IDL/be/be_sunsoft.cpp index ac68ae4d46b..d083179e647 100644 --- a/TAO/TAO_IDL/be/be_sunsoft.cpp +++ b/TAO/TAO_IDL/be/be_sunsoft.cpp @@ -65,13 +65,13 @@ TAO_SunSoft_OutStream::print (AST_Expression *expr) this->TAO_OutStream::print ("%hd", ev->u.sval); break; case AST_Expression::EV_ushort: - this->TAO_OutStream::print ("%hu%c", ev->u.usval, 'u'); + this->TAO_OutStream::print ("%hu%c", ev->u.usval, 'U'); break; case AST_Expression::EV_long: this->TAO_OutStream::print ("%ld", ev->u.lval); break; case AST_Expression::EV_ulong: - this->TAO_OutStream::print ("%u%c", ev->u.ulval, 'u'); + this->TAO_OutStream::print ("%u%c", ev->u.ulval, 'U'); break; case AST_Expression::EV_longlong: #if ! defined (ACE_LACKS_LONGLONG_T) @@ -80,11 +80,11 @@ TAO_SunSoft_OutStream::print (AST_Expression *expr) break; case AST_Expression::EV_ulonglong: #if ! defined (ACE_LACKS_LONGLONG_T) - this->TAO_OutStream::print ("%u%c", ev->u.ullval, 'u'); + this->TAO_OutStream::print ("%u%c", ev->u.ullval, 'U'); #endif /* ! defined (ACE_LACKS_LONGLONG_T) */ break; case AST_Expression::EV_float: - this->TAO_OutStream::print ("%f%c", ev->u.fval, 'f'); + this->TAO_OutStream::print ("%f%c", ev->u.fval, 'F'); break; case AST_Expression::EV_double: this->TAO_OutStream::print ("%f", ev->u.dval); -- cgit v1.2.1