summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL
diff options
context:
space:
mode:
authorvzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-03-07 16:20:38 +0000
committervzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-03-07 16:20:38 +0000
commitdb047885e63c13aca71c273a6f1758d5017fcc07 (patch)
treeb876b96486a2ef0fedfde859a053fdc2de33a5b5 /TAO/TAO_IDL
parent1694202b986e227a9ec7bb414a41c9d16428ba5a (diff)
downloadATCD-db047885e63c13aca71c273a6f1758d5017fcc07.tar.gz
Mon Mar 7 16:19:40 UTC 2011 Vladimir Zykov <vladimir.zykov@prismtech.com>
* orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp: * tao/GIOP_Message_Base.cpp: * TAO_IDL/be/be_visitor_arg_traits.cpp: * TAO_IDL/be/be_codegen.cpp: * TAO_IDL/be/be_helper.cpp: * TAO_IDL/be/be_visitor_array/array_ci.cpp: * TAO_IDL/be/be_sequence.cpp: * TAO_IDL/be_include/be_helper.h: Fixed warnings from incorrect use of printf format.
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_helper.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_sequence.cpp10
-rw-r--r--TAO/TAO_IDL/be/be_visitor_arg_traits.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be_include/be_helper.h4
6 files changed, 12 insertions, 15 deletions
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index 703124292ff..7b70222ef04 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -2206,7 +2206,7 @@ TAO_CodeGen::gen_ifndef_string (const char *fname,
extension = fname;
}
- ACE_OS::sprintf (macro_name, prefix);
+ ACE_OS::sprintf (macro_name, "%s", prefix);
size_t offset = ACE_OS::strlen (prefix);
diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp
index ca9189e982f..5e07012d9c6 100644
--- a/TAO/TAO_IDL/be/be_helper.cpp
+++ b/TAO/TAO_IDL/be/be_helper.cpp
@@ -88,8 +88,6 @@ TAO_OutStream::TAO_OutStream (void)
{
this->tab_unit_str_ += ' ';
}
-
- this->tab_unit_ = this->tab_unit_str_.c_str ();
}
TAO_OutStream::~TAO_OutStream (void)
@@ -214,7 +212,7 @@ TAO_OutStream::indent (void)
{
for (int i = 0; i < this->indent_level_; i++)
{
- ACE_OS::fprintf (this->fp_, this->tab_unit_);
+ ACE_OS::fprintf (this->fp_, "%s", this->tab_unit_str_.c_str ());
}
}
@@ -460,8 +458,7 @@ TAO_OutStream::operator<< (AST_Expression *expr)
TAO_OutStream &
TAO_OutStream::print (Identifier *id)
{
- ACE_OS::fprintf (this->fp_,
- id->get_string ());
+ ACE_OS::fprintf (this->fp_, "%s", id->get_string ());
return *this;
}
diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp
index ad437f02673..eb11c450481 100644
--- a/TAO/TAO_IDL/be/be_sequence.cpp
+++ b/TAO/TAO_IDL/be/be_sequence.cpp
@@ -204,7 +204,7 @@ be_sequence::gen_name (void)
{
char ulval_str [NAMEBUFSIZE];
ACE_OS::sprintf (ulval_str,
- "_%lu",
+ "_%u",
this->max_size ()->ev ()->u.ulval);
ACE_OS::strcat (namebuf,
ulval_str);
@@ -465,7 +465,7 @@ be_sequence::instance_name ()
else
{
ACE_OS::sprintf (namebuf,
- "_TAO_bounded_object_reference_sequence_%s_%lu",
+ "_TAO_bounded_object_reference_sequence_%s_%u",
prim_type->local_name ()->get_string (),
this->max_size ()->ev ()->u.ulval);
}
@@ -481,7 +481,7 @@ be_sequence::instance_name ()
else
{
ACE_OS::sprintf (namebuf,
- "_TAO_bounded_valuetype_sequence_%s_%lu",
+ "_TAO_bounded_valuetype_sequence_%s_%u",
prim_type->local_name ()->get_string (),
this->max_size ()->ev ()->u.ulval);
}
@@ -539,7 +539,7 @@ be_sequence::instance_name ()
else
{
ACE_OS::sprintf (namebuf,
- "_TAO_bounded_value_sequence_%s_%lu",
+ "_TAO_bounded_value_sequence_%s_%u",
prim_type->local_name ()->get_string (),
this->max_size ()->ev ()->u.ulval);
}
@@ -826,7 +826,7 @@ be_sequence::compute_tc_name (void)
char bound[30] = { 0 };
ACE_OS::sprintf (bound,
- "_%lu",
+ "_%u",
this->max_size ()->ev ()->u.ulval);
ACE_CString local_tc_name =
diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
index ad52e61dc7b..18c71ba78ed 100644
--- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
@@ -687,7 +687,7 @@ be_visitor_arg_traits::visit_string (be_string *node)
size_t bound_length = num_digits + 1;
char* bound_string = 0;
ACE_NEW_RETURN (bound_string, char[bound_length], -1) ;
- ACE_OS::sprintf (bound_string, "%lu", bound);
+ ACE_OS::sprintf (bound_string, "%u", bound);
size_t cat_length = ACE_OS::strlen (alias->local_name ()->get_string ()) +
ACE_OS::strlen (bound_string) +
diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp
index ad856b33c9b..b87b2afc2e2 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp
@@ -179,7 +179,7 @@ int be_visitor_array_ci::visit_array (be_array *node)
'\0',
NAMEBUFSIZE);
ACE_OS::sprintf (buf,
- "_%ld",
+ "_%d",
node->dims ()[i]->ev ()->u.ulval);
unique += buf;
}
diff --git a/TAO/TAO_IDL/be_include/be_helper.h b/TAO/TAO_IDL/be_include/be_helper.h
index 9f0ecb4cae5..584d5804f89 100644
--- a/TAO/TAO_IDL/be_include/be_helper.h
+++ b/TAO/TAO_IDL/be_include/be_helper.h
@@ -159,7 +159,8 @@ public:
int nl (void);
/// "printf" style variable argument print
- int print (const char *format, ...);
+ int print (const char *format, ...)
+ ACE_GCC_FORMAT_ATTRIBUTE (printf, 2, 3);
/// Generate a #if !defined, #defined macro
int gen_ifdef_macro (const char *flat_name,
@@ -216,7 +217,6 @@ protected:
/// Used to set tab spaces.
ACE_CString tab_unit_str_;
- const char *tab_unit_;
};
#endif // if !defined