Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
1.5.0
-
None
Description
ADB generates "C" code with variable declaration after method call in block:
For Example:
.....
else
{
axiom_node_t *text_node = NULL;
axiom_node_get_first_child(parent, env);
axiom_text_t *text_element = NULL;
....
This won't compile using VC Compiler.
The XSLT creating this code is CADBBeamTemplateSource.xsl. Look at the following lines (starting at line: 789)
<xsl:when test="@simple and (count(property)Unable to render embedded object: File (=0 or count(itemtype)) not found.=0)">
status = AXIS2_FAILURE;
if(parent)
{
axis2_char_t *attrib_text = NULL;
attrib_text = axiom_element_get_attribute_value_by_name(axiom_node_get_data_element(parent, env), env, "nil");
if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
else
{
axiom_node_t *text_node = NULL;
axiom_node_get_first_child(parent, env);
axiom_text_t *text_element = NULL;
if (text_node &&
axiom_node_get_node_type(text_node, env) == AXIOM_TEXT)
text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, env);
text_value = "";
if(text_element && axiom_text_get_value(text_element, env))
status = <xsl:value-of select="$axis2_name"/>_deserialize_from_string(<xsl:value-of select="$name"/>, env, text_value, parent);
}
}
</xsl:when>