axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frederic Heem (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2C-1159) warning: 'k' is used uninitialized in this function
Date Thu, 22 May 2008 15:55:56 GMT
warning: 'k' is used uninitialized in this function
---------------------------------------------------

                 Key: AXIS2C-1159
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1159
             Project: Axis2-C
          Issue Type: Bug
          Components: code generation
    Affects Versions: 1.4.0
         Environment: linux fc5
            Reporter: Frederic Heem


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;
                }



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message