You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2006/11/27 15:44:22 UTC

svn commit: r479641 - in /incubator/tuscany/cpp/sca/runtime: core/src/tuscany/sca/model/ core/src/tuscany/sca/util/ extensions/cpp/src/tuscany/sca/cpp/model/ extensions/ws/reference/axis2c/src/tuscany/sca/ws/ extensions/ws/service/axis2c/src/tuscany/sc...

Author: robbinspg
Date: Mon Nov 27 06:44:21 2006
New Revision: 479641

URL: http://svn.apache.org/viewvc?view=rev&rev=479641
Log:
Fix compiler warnings in SCA

Most of these were caused by the SDO list classes PropertyList, DataObjectList, TypeList etc. returning int instead of unsigned int on size() methods.
These should all be unsigned according to the spec

Modified:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp?view=diff&rev=479641&r1=479640&r2=479641
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp Mon Nov 27 06:44:21 2006
@@ -234,7 +234,7 @@
                 // Composite services
                 // ------------
                 DataObjectList& compositeServiceList = root->getList("service");
-                for (int i = 0; i < compositeServiceList.size(); i++)
+                for (unsigned int i = 0; i < compositeServiceList.size(); i++)
                 {
                     addCompositeService(composite, compositeServiceList[i]);                        
                 }
@@ -243,7 +243,7 @@
                 // Composite references
                 // -----------------
                 DataObjectList& compositeReferenceList = root->getList("reference");
-                for (int cri = 0; cri < compositeReferenceList.size(); cri++)
+                for (unsigned int cri = 0; cri < compositeReferenceList.size(); cri++)
                 {
                     addCompositeReference(composite, compositeReferenceList[cri]);
                 }
@@ -252,7 +252,7 @@
                 // Wires
                 // -----
                 DataObjectList& wireList = root->getList("wire");
-                for (int l = 0; l < wireList.size(); l++)
+                for (unsigned int l = 0; l < wireList.size(); l++)
                 {
                     string source = wireList[l]->getCString("source");
                     string target = wireList[l]->getCString("target");
@@ -276,7 +276,7 @@
                 // Add components to the composite
                 // ----------------------------
                 DataObjectList& componentList = root->getList("component");
-                int i;
+                unsigned int i;
                 for (i=0; i < componentList.size(); i++)
                 {
                     addComponent(composite, componentList[i]);                        
@@ -385,7 +385,7 @@
                 // First check that references and properties exist, some component types
                 // will create all used references & properties automatically
                 DataObjectList& refs = componentDO->getList("reference");
-                for (int i=0; i<refs.size(); i++)
+                for (unsigned int i=0; i<refs.size(); i++)
                 {
                     string refName = refs[i]->getCString("name");
                     if (!componentType->findReferenceType(refName))
@@ -397,7 +397,7 @@
                 }
 
                 DataObjectList& props = componentDO->getList("property");
-                for (int pi=0; pi<props.size(); pi++)
+                for (unsigned int pi=0; pi<props.size(); pi++)
                 {
                     string propName = props[pi]->getCString("name");
                     if (!componentType->findPropertyType(propName))
@@ -416,7 +416,7 @@
                 // ----------
                 // Properties
                 // ----------
-                for (int pi=0; pi<props.size(); pi++)
+                for (unsigned int pi=0; pi<props.size(); pi++)
                 {
                     string propName = props[pi]->getCString("name");
                     DataObjectPtr propValue = props[pi]->getDataObject("value");
@@ -427,7 +427,7 @@
                 // ----------
                 // References
                 // ----------
-                for (int ri=0; ri<refs.size(); ri++)
+                for (unsigned int ri=0; ri<refs.size(); ri++)
                 {
                     // ----------------------------------------------------------
                     // Add the reference to the composite wires to be resolved later
@@ -457,7 +457,7 @@
                 logentry(); 
 
                 DataObjectList& serviceTypes = componentTypeDO->getList("service");
-                for (int i=0; i<serviceTypes.size(); i++)
+                for (unsigned int i=0; i<serviceTypes.size(); i++)
                 {
                     Interface* iface = getInterface(composite, serviceTypes[i]);
                     ServiceType* serviceType =  new ServiceType(
@@ -474,7 +474,7 @@
                 logentry(); 
 
                 DataObjectList& refs = componentTypeDO->getList("reference");
-                for (int i=0; i<refs.size(); i++)
+                for (unsigned int i=0; i<refs.size(); i++)
                 {
                     ReferenceType::Multiplicity multiplicity;
                     if (refs[i]->isSet("multiplicity"))
@@ -552,7 +552,7 @@
                 logentry(); 
 
                 DataObjectList& props = componentTypeDO->getList("property");
-                for (int i=0; i<props.size(); i++)
+                for (unsigned int i=0; i<props.size(); i++)
                 {
                     //cout << "Property " << props[i];
                     
@@ -608,7 +608,7 @@
                 composite->addComponent(compositeService);    
 
                 DataObjectList& refs = compositeServiceDO->getList("reference");
-                for (int i=0; i<refs.size(); i++)
+                for (unsigned int i=0; i<refs.size(); i++)
                 {
                     // ----------------------------------------------------------
                     // Add the reference to the composite wires to be resolved later
@@ -739,7 +739,7 @@
                             {
                                 DataObjectList& xsds = compositeConfigFile->getRootDataObject()->getList("xsd/file");
     
-                                for (int i=0; i<xsds.size(); i++)
+                                for (unsigned int i=0; i<xsds.size(); i++)
                                 {
                                     if(xsds[i]->isSet("name"))
                                     {
@@ -754,7 +754,7 @@
                             if( compositeConfigFile->getRootDataObject()->isSet("wsdl"))
                             {
                                 DataObjectList& wsdls = compositeConfigFile->getRootDataObject()->getList("wsdl/file");
-                                for (int j=0; j<wsdls.size(); j++)
+                                for (unsigned int j=0; j<wsdls.size(); j++)
                                 {
                                     if(wsdls[i]->isSet("name"))
                                     { 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp?view=diff&rev=479641&r1=479640&r2=479641
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp Mon Nov 27 06:44:21 2006
@@ -98,7 +98,7 @@
                     
                     // Found the service
                     DataObjectList& portList = service->getList("port");
-                    for (int j=0; j<portList.size();j++)
+                    for (unsigned int j=0; j<portList.size();j++)
                     {
                         string portListName(portList[j]->getCString("name"));
                         if (portListName.compare(portName) == 0)
@@ -128,7 +128,7 @@
 
                             // Find the binding operation
                             DataObjectList& bindingOperationList = wsBinding->getList("operation");
-                            for (int i=0; i<bindingOperationList.size(); i++)
+                            for (unsigned int i=0; i<bindingOperationList.size(); i++)
                             {
                                 string name(bindingOperationList[i]->getCString("name"));
                                 
@@ -183,7 +183,7 @@
                             
                             // Found the portType, find the operation
                             DataObjectList& operationList = wsPortType->getList("operation");
-                            for (int k=0; k< operationList.size(); k++)
+                            for (unsigned int k=0; k< operationList.size(); k++)
                             {
                                 string opName(operationList[k]->getCString("name"));
                                 if( opName.compare(operationName) == 0)
@@ -281,7 +281,7 @@
 
                 // Found the portType, find the operation
                 DataObjectList& operationList = wsPortType->getList("operation");
-                for (int k=0; k< operationList.size(); k++)
+                for (unsigned int k=0; k< operationList.size(); k++)
                 {
                     string opName(operationList[k]->getCString("name"));
                     if( opName.compare(operationName) == 0)
@@ -350,7 +350,7 @@
                 for (unsigned int m = 0; m < wsdlModels.size(); m++)
                 {
                     DataObjectList& serviceList = wsdlModels[m]->getList("service");
-                    for (int i=0; i<serviceList.size(); i++)
+                    for (unsigned int i=0; i<serviceList.size(); i++)
                     {
                         string name(serviceList[i]->getCString("name"));
     
@@ -382,7 +382,7 @@
                 for (unsigned int m = 0; m < wsdlModels.size(); m++)
                 {
                     DataObjectList& bindingList = wsdlModels[m]->getList("binding");
-                    for (int i=0; i<bindingList.size(); i++)
+                    for (unsigned int i=0; i<bindingList.size(); i++)
                     {
                         string nameBinding(bindingList[i]->getCString("name"));
     
@@ -413,7 +413,7 @@
                 for (unsigned int m = 0; m < wsdlModels.size(); m++)
                 {
                     DataObjectList& portTypeList = wsdlModels[m]->getList("portType");
-                    for (int i=0; i<portTypeList.size(); i++)
+                    for (unsigned int i=0; i<portTypeList.size(); i++)
                     {
                         string namePortType(portTypeList[i]->getCString("name"));
     
@@ -444,7 +444,7 @@
                 for (unsigned int m = 0; m < wsdlModels.size(); m++)
                 {
                     DataObjectList& messageList = wsdlModels[m]->getList("message");
-                    for (int i=0; i<messageList.size(); i++)
+                    for (unsigned int i=0; i<messageList.size(); i++)
                     {
                         string nameMessage(messageList[i]->getCString("name"));
     

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp?view=diff&rev=479641&r1=479640&r2=479641
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp Mon Nov 27 06:44:21 2006
@@ -181,7 +181,7 @@
                         return false;
                     }
 
-                    for (int j = 0; j <dol1.size(); j++)
+                    for (unsigned int j = 0; j <dol1.size(); j++)
                     {                               
 
                         if (propertyType1.isDataType())
@@ -279,7 +279,7 @@
 
             if (pl1.size() != 0)
             {
-                for (int i = 0; i < pl1.size(); i++)
+                for (unsigned int i = 0; i < pl1.size(); i++)
                 {
                     if(!compareProperties(dataObject1, pl1[i], dataObject2, pl2[i], diff))
                     {
@@ -365,7 +365,7 @@
             PropertyList pl = dataObject->getInstanceProperties();
             if (pl.size() != 0)
             {
-                for (int i = 0; i < pl.size(); i++)
+                for (unsigned int i = 0; i < pl.size(); i++)
                 {
                     tabs(inc);
                     cout << "Property: " << pl[i].getName() << endl;
@@ -385,7 +385,7 @@
                         {
                             inc++;
                             DataObjectList& dol = dataObject->getList(pl[i]);
-                            for (int j = 0; j <dol.size(); j++)
+                            for (unsigned int j = 0; j <dol.size(); j++)
                             {
                                 tabs(inc);
                                 cout << "Value " << j <<endl;
@@ -467,7 +467,7 @@
                                     {
                                         inc++;
                                         DataObjectList& dol = dataObject->getList(p);
-                                        for (int j = 0; j <dol.size(); j++)
+                                        for (unsigned int j = 0; j <dol.size(); j++)
                                         {
                                             tabs(inc);
                                             cout << "Value " << j <<endl;
@@ -525,11 +525,11 @@
             // get the list of Types in the DataFactory and list them
             //////////////////////////////////////////////////////////////////////////
             TypeList tl = df->getTypes();
-            for (int i = 0; i < tl.size(); i++)
+            for (unsigned int i = 0; i < tl.size(); i++)
             {
                 cout << "Type: " << tl[i].getURI()<< "#" << tl[i].getName() << endl;
                 PropertyList pl = tl[i].getProperties();
-                for (int j = 0; j < pl.size(); j++)
+                for (unsigned int j = 0; j < pl.size(); j++)
                 {
                     cout << "\tProperty: " << pl[j].getName()
                         << " type: " <<pl[j].getType().getURI()<<"#"<<pl[j].getType().getName()<< endl;
@@ -546,7 +546,7 @@
             cout << "Type: " << type.getURI()<< "#" << type.getName() << endl;
             inc++;
             PropertyList pl = type.getProperties();
-            for (int j = 0; j < pl.size(); j++)
+            for (unsigned int j = 0; j < pl.size(); j++)
             {
                 tabs(inc);
                 cout << "\tProperty: " << pl[j].getName()

Modified: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp?view=diff&rev=479641&r1=479640&r2=479641
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp Mon Nov 27 06:44:21 2006
@@ -68,7 +68,7 @@
                 // Create CPP bindings for all the references
                 const Component::REFERENCE_MAP& references = component->getReferences();
                 Component::REFERENCE_MAP::const_iterator refiter = references.begin();
-                for (int ri=0; ri< references.size(); ri++)
+                for (unsigned int ri=0; ri< references.size(); ri++)
                 {
                     Reference *reference = refiter->second;
                     CPPReferenceBinding* binding = new CPPReferenceBinding(reference);

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp?view=diff&rev=479641&r1=479640&r2=479641
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp Mon Nov 27 06:44:21 2006
@@ -681,7 +681,7 @@
             
                             DataObjectList& dataObjectList = outputDataObject->getList(pl[0]);
                             
-                            for(int j=0; j<dataObjectList.size(); j++)
+                            for(unsigned int j=0; j<dataObjectList.size(); j++)
                             {
                                 DataObjectPtr dob = dataObjectList[j];
                                 if(!dob)

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp?view=diff&rev=479641&r1=479640&r2=479641
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp Mon Nov 27 06:44:21 2006
@@ -370,7 +370,7 @@
                                                 binding->getEndpointName(),
                                                 op_name.c_str());
                                         }
-                                        catch(SystemConfigurationException& ex)
+                                        catch(SystemConfigurationException&)
                                         {   
                                             throw;
                                         }
@@ -400,7 +400,7 @@
                                                 {
                                                     wsdlOperation = wsdl->findOperation(wsdlInterface->getName(), op_name.c_str());
                                                 }
-                                                catch(SystemConfigurationException& ex)
+                                                catch(SystemConfigurationException&)
                                                 {   
                                                     throw;
                                                 }

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp?view=diff&rev=479641&r1=479640&r2=479641
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp Mon Nov 27 06:44:21 2006
@@ -140,7 +140,7 @@
                     // Go through the input data object to set the operation parameters
                     PropertyList pl = inputDataObject->getInstanceProperties();
                 
-                    for(int i=0; i<pl.size(); i++)
+                    for(unsigned int i=0; i<pl.size(); i++)
                     {
                         const char* name = pl[i].getName();
                 
@@ -247,7 +247,7 @@
                 
                                 DataObjectList& dataObjectList = inputDataObject->getList(pl[i]);
                                 
-                                for(int j=0; j<dataObjectList.size(); j++)
+                                for(unsigned int j=0; j<dataObjectList.size(); j++)
                                 {
                                     DataObjectPtr dataObjectData = dataObjectList[j];
                                     if(!dataObjectData)
@@ -443,7 +443,7 @@
                 else {
             
                     // Should only be one return value.. This goes through all return values
-                    for(int i=0; i<pl.size(); i++)
+                    for(unsigned int i=0; i<pl.size(); i++)
                     {
                         const char* name = pl[i].getName();
     



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org