summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp67
2 files changed, 38 insertions, 31 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp
index 789394d6f72..ee9933346a7 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp
@@ -193,7 +193,7 @@ int be_visitor_union_cs::visit_union (be_union *node)
os->indent ();
*os << "// the virtual overloaded access method" << be_nl;
*os << "void *" << node->name () << "::_access ("
- << " CORBA::Boolean alloc_flag)" << be_nl;
+ << "CORBA::Boolean alloc_flag)" << be_nl;
*os << "{" << be_idt_nl;
*os << "switch (this->disc_)" << be_nl;
*os << "{" << be_idt_nl;
diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp
index 04e57571655..c5f48b562b9 100644
--- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp
@@ -156,10 +156,10 @@ be_visitor_union_branch_public_access_cs::visit_array (be_array *node)
}
os = this->ctx_->stream ();
- *os << "if (alloc_flag)" << be_idt_nl;
- *os << "this->u_." << ub->local_name () << "_ = " << fname
- << "_alloc ();" << be_uidt_nl;
- *os << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "if (alloc_flag)" << be_idt_nl
+ << "this->u_." << ub->local_name () << "_ = " << fname
+ << "_alloc ();" << be_uidt_nl
+ << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
return 0;
}
@@ -181,7 +181,8 @@ be_visitor_union_branch_public_access_cs::visit_enum (be_enum *)
), -1);
}
TAO_OutStream *os = this->ctx_->stream ();
- *os << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "ACE_UNUSED_ARG (alloc_flag);" << be_nl
+ << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
return 0;
}
@@ -211,12 +212,12 @@ be_visitor_union_branch_public_access_cs::visit_interface (be_interface *node)
), -1);
}
TAO_OutStream *os = this->ctx_->stream ();
- *os << "if (alloc_flag)" << be_idt_nl;
- *os << "ACE_NEW_RETURN (this->u_." << ub->local_name () << "_, "
+ *os << "if (alloc_flag)" << be_idt_nl
+ << "ACE_NEW_RETURN (this->u_." << ub->local_name () << "_, "
<< "(TAO_Object_Field_T<"
<< bt->name () << ","
- << bt->name () << "_var>), 0);" << be_uidt_nl;
- *os << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ << bt->name () << "_var>), 0);" << be_uidt_nl
+ << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
return 0;
}
@@ -238,7 +239,8 @@ be_visitor_union_branch_public_access_cs::visit_interface_fwd (be_interface_fwd
), -1);
}
TAO_OutStream *os = this->ctx_->stream ();
- *os << "return (CORBA::Object_ptr) &this->u_." << ub->local_name ()
+ *os << "ACE_UNUSED_ARG (alloc_flag);" << be_nl
+ << "return (CORBA::Object_ptr) &this->u_." << ub->local_name ()
<< "_->inout ();" << be_uidt_nl;
return 0;
@@ -273,18 +275,21 @@ be_visitor_union_branch_public_access_cs::visit_predefined_type (be_predefined_t
switch (node->pt ())
{
case AST_PredefinedType::PT_pseudo:
- *os << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "ACE_UNUSED_ARG (alloc_flag);" << be_nl
+ << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
break;
case AST_PredefinedType::PT_any:
- *os << "if (alloc_flag)" << be_idt_nl;
- *os << "this->u_." << ub->local_name () << "_ = new " << bt->name ()
- << ";" << be_uidt_nl;
- *os << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "if (alloc_flag)" << be_idt_nl
+ << "this->u_." << ub->local_name () << "_ = new " << bt->name ()
+ << ";" << be_uidt_nl
+ << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
break;
case AST_PredefinedType::PT_void:
+ *os << "ACE_UNUSED_ARG (alloc_flag);" << be_nl;
break;
default:
- *os << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "ACE_UNUSED_ARG (alloc_flag);" << be_nl
+ << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
}
return 0;
}
@@ -314,10 +319,10 @@ be_visitor_union_branch_public_access_cs::visit_sequence (be_sequence *node)
), -1);
}
os = this->ctx_->stream ();
- *os << "if (alloc_flag)" << be_idt_nl;
- *os << "this->u_." << ub->local_name () << "_ = new " << bt->name ()
- << ";" << be_uidt_nl;
- *os << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "if (alloc_flag)" << be_idt_nl
+ << "this->u_." << ub->local_name () << "_ = new " << bt->name ()
+ << ";" << be_uidt_nl
+ << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
return 0;
}
@@ -339,7 +344,8 @@ be_visitor_union_branch_public_access_cs::visit_string (be_string *)
), -1);
}
TAO_OutStream *os = this->ctx_->stream ();
- *os << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "ACE_UNUSED_ARG (alloc_flag);" << be_nl
+ << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
return 0;
}
@@ -371,14 +377,15 @@ be_visitor_union_branch_public_access_cs::visit_structure (be_structure *node)
os = this->ctx_->stream ();
if (bt->size_type () == be_type::VARIABLE)
{
- *os << "if (alloc_flag)" << be_idt_nl;
- *os << "this->u_." << ub->local_name () << "_ = new " << bt->name ()
- << ";" << be_uidt_nl;
- *os << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "if (alloc_flag)" << be_idt_nl
+ << "this->u_." << ub->local_name () << "_ = new " << bt->name ()
+ << ";" << be_uidt_nl
+ << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
}
else
{
- *os << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "ACE_UNUSED_ARG (alloc_flag);" << be_nl
+ << "return &this->u_." << ub->local_name () << "_;" << be_uidt_nl;
}
return 0;
@@ -430,10 +437,10 @@ be_visitor_union_branch_public_access_cs::visit_union (be_union *node)
), -1);
}
os = this->ctx_->stream ();
- *os << "if (alloc_flag)" << be_idt_nl;
- *os << "this->u_." << ub->local_name () << "_ = new " << bt->name ()
- << ";" << be_uidt_nl;
- *os << "return this->u_." << ub->local_name () << "_;" << be_uidt_nl;
+ *os << "if (alloc_flag)" << be_idt_nl
+ << "this->u_." << ub->local_name () << "_ = new " << bt->name ()
+ << ";" << be_uidt_nl
+ << "return this->u_." << ub->local_name () << "_;" << be_uidt;
return 0;
}