Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.0
-
None
-
None
-
linux fc5
Description
The warning "'k' is used uninitialized in this function" is much more than a warning, it's a real bug that will be hard to solved if not cured correclty.
Here is the piece of WSDL that cause the problem:
<xsd:element name="ActiveEndpointResponseParam">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="activeEndpoint" type="xsd:unsignedShort" minOccurs="0" maxOccurs="256"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
This is the generated code:
axis2_status_t AXIS2_CALL
adb_ActiveEndpointResponseParam_set_activeEndpoint_at(
adb_ActiveEndpointResponseParam_t* _ActiveEndpointResponseParam,
const axutil_env_t *env, int i,
const unsigned short arg_activeEndpoint)
{
void *element = NULL;
int size = 0;
int j;
int k;
axis2_bool_t non_nil_exists = AXIS2_FALSE;
unsigned short* ptr_param_activeEndpoint;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, _ActiveEndpointResponseParam, AXIS2_FAILURE);
if( _ActiveEndpointResponseParam->is_valid_activeEndpoint &&
_ActiveEndpointResponseParam->property_activeEndpoint &&
arg_activeEndpoint == ((unsigned short)axutil_array_list_get(_ActiveEndpointResponseParam->property_activeEndpoint, env, i)))
{ return AXIS2_SUCCESS; }non_nil_exists = AXIS2_TRUE; /* no way to check for nill for each elements for primitive types */
if( k < 0)
{ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of activeEndpoint is beinng set to be smaller than the specificed number of minOccurs(0)"); return AXIS2_FAILURE; }