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:26:51 UTC

svn commit: r479634 - in /incubator/tuscany/cpp/sdo/runtime/core: src/commonj/sdo/ test/

Author: robbinspg
Date: Mon Nov 27 06:26:49 2006
New Revision: 479634

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

Most of these were caused by the 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/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectList.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelper.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelper.h
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h
    incubator/tuscany/cpp/sdo/runtime/core/test/SdoGenerate.cpp
    incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp
    incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp
    incubator/tuscany/cpp/sdo/runtime/core/test/utils.cpp

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp Mon Nov 27 06:26:49 2006
@@ -95,7 +95,7 @@
 
                     if ((*elementsiter).isDeletion)
                     {
-                        for (int i = 0; i < deletions.size(); i++)
+                        for (unsigned int i = 0; i < deletions.size(); i++)
                         {
                             if (value.equals (deletions[i].reference))
                             {
@@ -249,7 +249,7 @@
             }
 
             // it could be a deletion which has not been processed yet
-            for (int i = 0; i < deletions.size(); i++)
+            for (unsigned int i = 0; i < deletions.size(); i++)
             {
                 if (contpath.equals (deletions[i].reference))
                 {
@@ -302,7 +302,7 @@
             SDOXMLString refstring = createDeletes[index].value.substring(0,pos);
             pos = atoi((const char*)(createDeletes[index].value.substring(pos+1)));
                                      
-            for (int k=index+1;k<createDeletes.size();k++)
+            for (unsigned int k=index+1;k<createDeletes.size();k++)
             {
 
                 if (createDeletes[k].type.equals("create")) continue;
@@ -329,7 +329,7 @@
         {
             LOGENTRY(INFO,"CSBuilder:buildChangeSummary");
 
-            int i;
+            unsigned int i;
 
             try {
                 if (changeSummaryDO == 0)
@@ -395,7 +395,7 @@
                     else 
                     {
                         // its a deletion - match it.
-                        for (int j = 0; j < deletions.size(); j++)
+                        for (unsigned int j = 0; j < deletions.size(); j++)
                         {
                             if (deletions[j].completedprocessing)continue;
 
@@ -421,7 +421,7 @@
                 std::list<changeAttribute>::iterator a;
                 std::list<changeElement>::iterator e;
 
-                for (i = 0; i< changes.size(); i++)
+                for (unsigned i = 0; i< changes.size(); i++)
                 {
                     DataObjectPtr dob;
                     if (changes[i].reference.isNull())
@@ -451,7 +451,7 @@
                             }
                             else
                             {
-                                for (int j = 0; j < deletions.size(); j++)
+                                for (unsigned int j = 0; j < deletions.size(); j++)
                                 {
                                     if ((*a).value.equals (deletions[j].reference))
                                     {
@@ -473,7 +473,7 @@
                                 LOGINFO_1(INFO,"CSBuilder Change was a deletion of:%s",
                                     (const char*)((*e).path));
 
-                                for (int j = 0; j < deletions.size(); j++)
+                                for (unsigned int j = 0; j < deletions.size(); j++)
                                 {
                                     if ((*e).path.equals (deletions[j].reference))
                                     {
@@ -635,7 +635,7 @@
 
                 if (currentLocation.size() > 0)
                 {
-                    for (int pi = 0; pi < currentLocation.size()-1; pi++)
+                    for (unsigned int pi = 0; pi < currentLocation.size()-1; pi++)
                     {
                         curr_loc  = curr_loc + currentLocation[pi];
                         curr_loc = curr_loc + "/";
@@ -674,7 +674,7 @@
 
                     bool isDelete = false;
 
-                    for (int i = 0; i < createDeletes.size(); i++)
+                    for (unsigned int i = 0; i < createDeletes.size(); i++)
                     {
                         if (createDeletes[i].type.equals("delete"))
                         {
@@ -768,7 +768,7 @@
                 SDOXMLString curr_loc = "";
                 if (currentLocation.size() > 0)
                 {
-                    for (int pi = 0; pi < currentLocation.size()-1; pi++)
+                    for (unsigned int pi = 0; pi < currentLocation.size()-1; pi++)
                     {
                         curr_loc  = curr_loc + currentLocation[pi];
                         curr_loc = curr_loc + "/";
@@ -783,7 +783,7 @@
                     // can we match the current path to a known deletion?
                     bool isDelete = false;
 
-                    for (int i = 0; i < createDeletes.size(); i++)
+                    for (unsigned int i = 0; i < createDeletes.size(); i++)
                     {
                         if (createDeletes[i].type.equals("delete"))
                         {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp Mon Nov 27 06:26:49 2006
@@ -148,7 +148,7 @@
         // find any properties which are data objects, log their
         // deletion first.
 
-        int i;
+        unsigned int i;
 
         // Trace for change summaries
 
@@ -173,7 +173,7 @@
             if (changeLogIter != changedMap.end())
             {
                 // would hope there was an entry
-                int index;
+                unsigned int index;
                 if (prop.isMany())
                 {
                     DataObjectList& dl = container->getList(prop);
@@ -377,7 +377,7 @@
         // need to be created too
 
         PropertyList pl = ob->getInstanceProperties();
-        for (int p=0;p<pl.size();p++)
+        for (unsigned int p=0;p<pl.size();p++)
         {
             Property& thisprop = pl[p];
             if (!thisprop.getType().isDataType())
@@ -389,7 +389,7 @@
                     if (thisprop.isMany())
                     {
                         DataObjectList& dol = ob->getList(thisprop);
-                        for (int ds = 0; ds < dol.size(); ds++) 
+                        for (unsigned int ds = 0; ds < dol.size(); ds++) 
                         {
                             dp = dol[ds];
                             if (!dp) continue; 
@@ -837,7 +837,7 @@
                 slist.append(new Setting(false,false,0,0,prop,0));
                 return;
             }
-            for (int i=0;i< dol.size(); i++)
+            for (unsigned int i=0;i< dol.size(); i++)
             {
                 DataObject* dob = dol[i];
                 if (prop.getType().isDataType()) {
@@ -1275,7 +1275,7 @@
             {
                 char* vw = new char[(strlen(c)+1)*sizeof(wchar_t)];                
                 wchar_t* pvw = (wchar_t*)vw;
-                for (int i=0;i< strlen(c);i++)
+                for (unsigned int i=0;i< strlen(c);i++)
                 {
                     pvw[i] = (wchar_t)c[i];
                 }
@@ -1287,7 +1287,7 @@
         case Type::BytesType:
             {
                 char* vc = new char[strlen(c)+1];
-                for (int i=0;i< strlen(c);i++)
+                for (unsigned int i=0;i< strlen(c);i++)
                 {
                     vc[i] =  (char)c[i];
                 }

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h Mon Nov 27 06:26:49 2006
@@ -68,15 +68,15 @@
  * 
  * Gets the nth element of a list
  */
-    virtual SDO_API DataObjectPtr operator[] (int pos) = 0;
-    virtual SDO_API const DataObjectPtr operator[] (int pos) const = 0;
+    virtual SDO_API DataObjectPtr operator[] (unsigned int pos) = 0;
+    virtual SDO_API const DataObjectPtr operator[] (unsigned int pos) const = 0;
 
 /**  size() returns the number of list elements.
  * 
  * Returns the number of list elements
  */
 
-    virtual SDO_API int size () const = 0;
+    virtual SDO_API unsigned int size () const = 0;
 
 /**  getType() returns the type of a list element.
  * 

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp Mon Nov 27 06:26:49 2006
@@ -128,7 +128,7 @@
      *
      */
 
-    RefCountingPointer<DataObject> ChangedDataObjectListImpl::operator[] (int pos)
+    RefCountingPointer<DataObject> ChangedDataObjectListImpl::operator[] (unsigned int pos)
     {
         validateIndex(pos);
         return plist[pos].getObject();
@@ -139,7 +139,7 @@
      *
      */
 
-    const RefCountingPointer<DataObject> ChangedDataObjectListImpl::operator[] (int pos) const
+    const RefCountingPointer<DataObject> ChangedDataObjectListImpl::operator[] (unsigned int pos) const
     {    
         validateIndex(pos);
         return  plist[pos].getObject();
@@ -160,7 +160,7 @@
      *
      */
 
-    int ChangedDataObjectListImpl::size () const
+    unsigned int ChangedDataObjectListImpl::size () const
     {
         return plist.size();
     }
@@ -229,7 +229,7 @@
      *  checks that the index is in range.
      */
 
-    void ChangedDataObjectListImpl::validateIndex(int index) const
+    void ChangedDataObjectListImpl::validateIndex(unsigned int index) const
     {
         if ((index < 0) || (index >= size()))
         {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h Mon Nov 27 06:26:49 2006
@@ -71,13 +71,13 @@
     ChangedDataObjectListImpl();
 
     virtual ~ChangedDataObjectListImpl();
-    virtual DataObjectPtr operator[] (int pos);
-    virtual const DataObjectPtr operator[] (int pos) const;
+    virtual DataObjectPtr operator[] (unsigned int pos);
+    virtual const DataObjectPtr operator[] (unsigned int pos) const;
     virtual DataObject* get(unsigned int pos);
     virtual ChangedDataObjectList::ChangeType getType(unsigned int pos);
 
 
-    virtual int size () const;
+    virtual unsigned int size () const;
 
     virtual void insert (unsigned int index, DataObject *d, ChangedDataObjectList::ChangeType type);
 
@@ -92,7 +92,7 @@
     CHANGEDDATAOBJECT_VECTOR plist;
     CHANGEDDATAOBJECT_VECTOR getVec() const;
 
-    void validateIndex(int index) const;
+    void validateIndex(unsigned int index) const;
 };
 };
 };

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp Mon Nov 27 06:26:49 2006
@@ -105,7 +105,7 @@
 
     void CopyHelper::transferlist(DataObjectList& to, DataObjectList& from, Type::Types t)
     {
-        for (int i=0;i< from.size(); i++)
+        for (unsigned int i=0;i< from.size(); i++)
         {
             switch (t)
             {
@@ -213,7 +213,7 @@
         if (!newob) return 0;
 
         PropertyList pl = dataObject->getInstanceProperties();
-        for (int i=0;i < pl.size(); i++)
+        for (unsigned int i=0;i < pl.size(); i++)
         {
             if (dataObject->isSet(pl[i]))
             {
@@ -230,7 +230,7 @@
                         {
                             DataObjectList& dolold = dataObject->getList(pl[i]);
                             DataObjectList& dolnew = newob->getList(pl[i]);
-                            for (int i=0;i< dolold.size(); i++)
+                            for (unsigned int i=0;i< dolold.size(); i++)
                             {
                                 dolnew.append(internalCopy(dolold[i],true));
                             }

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp Mon Nov 27 06:26:49 2006
@@ -166,7 +166,7 @@
 
         if ((typeIter->second)->getAliasCount() > 0)
         {
-            for (int j=0;j<(typeIter->second)->getAliasCount();j++)
+            for (unsigned int j=0;j<(typeIter->second)->getAliasCount();j++)
             {
                 (typeIter2->second)->setAlias(
                     (typeIter->second)->getAlias());
@@ -176,7 +176,7 @@
         
         // Now add all the properties
         PropertyList props = typeIter->second->getProperties();
-        for (int i=0; i < props.size(); i++)
+        for (unsigned int i=0; i < props.size(); i++)
         {
             // Ensure the properties type is added
             const Type& propType = props[i].getType();
@@ -200,7 +200,7 @@
                     getPropertyImpl(props[i].getName());
                 if (p != 0)
                 {
-                    for (int j=0;j<p->getAliasCount();j++)
+                    for (unsigned int j=0;j<p->getAliasCount();j++)
                     {
                         p->setAlias(props[i].getAlias(j));
                     }
@@ -286,7 +286,7 @@
 
     PropertyList pl = cs->getProperties();
     
-    for (int i=0 ; i < pl.size() ; i++ )
+    for (unsigned int i=0 ; i < pl.size() ; i++ )
     {
         if (recursiveCheck((TypeImpl*)&(pl[i].getType()), t)) return true;
     }
@@ -309,7 +309,7 @@
     }
 
     if (cstypes.size() > 0) {
-        for (int i = 0 ;i < cstypes.size(); i++) 
+        for (unsigned int i = 0 ;i < cstypes.size(); i++) 
         {
             if (recursiveCheck(cstypes[i], t)) 
             {
@@ -1654,7 +1654,7 @@
 bool DataFactoryImpl::compareTypes(const TypeImpl* t1, const Type& t2)
 {
     PropertyList pl = t2.getProperties();
-    for (int i=0;i<pl.size();i++)
+    for (unsigned int i=0;i<pl.size();i++)
     {
         PropertyImpl* p = t1->getPropertyImpl(i);
         if (p == 0) return false;
@@ -1678,7 +1678,7 @@
     if (!compareTypes(t2,t)) return false;
 
     PropertyList pl = t.getProperties();
-    for (int i=0;i<pl.size();i++)
+    for (unsigned int i=0;i<pl.size();i++)
     {
         if (pl[i].getType().isDataObjectType())
         {
@@ -1697,7 +1697,7 @@
     if (d == 0)
     {
         TypeList tl = df->getTypes();
-        for (int j=0;j<tl.size();j++)
+        for (unsigned int j=0;j<tl.size();j++)
         {
             const TypeImpl* t = findTypeImpl(tl[j].getURI(),
                                         tl[j].getName());
@@ -1776,8 +1776,8 @@
         fprintf(header," * Forward declarations and smart pointers *\n");
         fprintf(header," *******************************************/\n\n\n");
 
-        int i;
-        for (i=0;i<tl.size();i++)
+        unsigned int i;
+        for (unsigned i=0;i<tl.size();i++)
         {
             nscount = 0;
 
@@ -1846,7 +1846,7 @@
             {
                 the_uri = new char[2 * strlen(uri) + 1];
                 int jj=0;
-                for (int ii=0;ii<strlen(uri);ii++)
+                for (unsigned int ii=0;ii<strlen(uri);ii++)
                 {
                     if (uri[ii] == '.')
                     {
@@ -1949,7 +1949,7 @@
 
 
             PropertyList pl = tl[i].getProperties();
-            for (int j=0;j<pl.size();j++)
+            for (unsigned int j=0;j<pl.size();j++)
             {
                 const char* pname = pl[j].getName();
 

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp Mon Nov 27 06:26:49 2006
@@ -944,8 +944,9 @@
 
     void DataObjectImpl::undefineProperty(unsigned int index)
     {
-        int point = index - openBase;
-        if (point < 0 || point >= openProperties.size()) return;
+		if (index < openBase) return;
+        unsigned int point = index - openBase;
+        if (point >= openProperties.size()) return;
 
         // downgrade all the property settings above this one
 
@@ -967,7 +968,7 @@
 
         std::list<PropertyImpl>::iterator it = 
             openProperties.begin();
-        for (int i=0;i<point;i++)++it; /* there must be a better way */
+        for (unsigned int i=0;i<point;i++)++it; /* there must be a better way */
 
         DataFactory* df = factory;
         ((DataFactoryImpl*)df)->removeOpenProperty((*it).getName());
@@ -1563,7 +1564,7 @@
     {
         PropertyList props = getType().getProperties(); 
 
-        for (int i = 0; i < props.size() ; ++i)
+        for (unsigned int i = 0; i < props.size() ; ++i)
         {
             if (!strcmp(props[i].getName(),p.getName()) )
             {
@@ -1672,7 +1673,7 @@
             if (index >= openBase && index - openBase  < openProperties.size())
             {
                 std::list<PropertyImpl>::iterator j;
-                int val = 0;
+                unsigned int val = 0;
                 j = openProperties.begin();
                 while (val < index-openBase && j != openProperties.end())
                 {
@@ -1703,7 +1704,7 @@
 
         s = new char[strlen(path)+1];
 
-        for (int i=0;i < strlen(path); i++) 
+        for (unsigned int i=0;i < strlen(path); i++) 
         {
             if (strchr(templateString,path[i]) != 0) {
                 s[pos++] = path[i];
@@ -1783,7 +1784,7 @@
         if (eq == string::npos)
         {
             // There is no "=" sign
-            int val = atoi(breakerStr.c_str());
+            unsigned int val = atoi(breakerStr.c_str());
             DataObjectList& list = getList(p);
             
             // The spec says that depts[1] is the first element, as is depts.0
@@ -1807,7 +1808,7 @@
         // eq is now propval
         
         DataObjectList& list = getList(p);
-        for (int li = 0 ; li < list.size() ; ++li)
+        for (unsigned int li = 0 ; li < list.size() ; ++li)
         {
             // TODO  comparison for double not ok
             
@@ -2064,7 +2065,7 @@
     {
         std::vector<PropertyImpl*> theVec;
         PropertyList propList = getType().getProperties();
-        for (int i = 0 ; i < propList.size() ; ++i)
+        for (unsigned int i = 0 ; i < propList.size() ; ++i)
         {
             Property& p = propList[i];
             theVec.insert(theVec.end(),(PropertyImpl*)&p);
@@ -2263,13 +2264,16 @@
                     if (p->isMany())
                     {
                         DataObjectList& dol = d->getList((Property&)*p);
-                        long index;
-                        DataObjectImpl* dx = d->findDataObject(prop,&index);
+                        long idx;
+                        DataObjectImpl* dx = d->findDataObject(prop,&idx);
+						// fix this. This is the only place the 2nd parm to findDataObject
+						// is used. Need a better way to do this
+						unsigned int index = (unsigned int)idx;
                         if (index >= 0)
                         {
                             if(index < dol.size())
                             {
-                                dol.setDataObject((unsigned int)index,value);
+                                dol.setDataObject(index,value);
                             }
                             else 
                             {
@@ -2323,7 +2327,7 @@
     {
         bool isData = false;
         PropertyList pl = d->getInstanceProperties();
-        for (int i=0;i<pl.size();i++)
+        for (unsigned int i=0;i<pl.size();i++)
         {
             // even primitives need their DF fixed up
             if (pl[i].getType().isDataType())
@@ -2338,7 +2342,7 @@
             if (pl[i].isMany())
             {
                 DataObjectList& dl = d->getList(pl[i]);
-                for (int j=0;j<dl.size();j++)
+                for (unsigned int j=0;j<dl.size();j++)
                 {
                     
                     DataObject* d2 = dl[j];
@@ -2445,7 +2449,7 @@
             if (pi != 0) 
             {
                 unsigned int subcount = pi->getSubstitutionCount();
-                for (int i=0;i<subcount;i++)
+                for (unsigned int i=0;i<subcount;i++)
                 {
                     const Type* tsub = pi->getSubstitutionType(i);
                     if (tsub != 0 && tsub->equals(objectType)) return;
@@ -3116,7 +3120,7 @@
             if (prop.isMany())
             {
                 DataObjectList& dol = ((*i).second)->getList();
-                for (int j=0;j< dol.size(); j++)
+                for (unsigned int j=0;j< dol.size(); j++)
                 {
                     if (dol[j] == indol)
                     {
@@ -3192,7 +3196,7 @@
             if (getProperty((*i).first).isMany())
             {
                 DataObjectList& dl = ((*i).second)->getList();
-                for (int j = 0 ; j < dl.size(); j++)
+                for (unsigned int j = 0 ; j < dl.size(); j++)
                 {
                     if (dl[j] == ob)
                     {
@@ -3748,7 +3752,7 @@
     {
         LOGINFO_1(INFO,"ChangeSummary:Unsetting a reference to %s",prop.getName());
 
-        for (int i=0;i< refs.size();i++)
+        for (unsigned int i=0;i< refs.size();i++)
         {
             if (refs[i]->getDataObject() == dol)
             {
@@ -3765,7 +3769,7 @@
 
     void DataObjectImpl::clearReferences()
     {
-        for (int i=0;i<refs.size();i++)
+        for (unsigned int i=0;i<refs.size();i++)
         {
             // Note - no loop as the referer must be of type reference
             refs[i]->getDataObject()->unset(refs[i]->getProperty());
@@ -3789,7 +3793,7 @@
 
             if (p.isMany()) {
                 DataObjectList& dol = dob->getList(p);
-                for (int i=0;i<dol.size();i++)
+                for (unsigned int i=0;i<dol.size();i++)
                 {
                     if (dol[i] == thisob)
                     {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h Mon Nov 27 06:26:49 2006
@@ -662,7 +662,7 @@
 
  
     // Support for open types
-    int openBase;
+    unsigned int openBase;
     std::list<PropertyImpl> openProperties;
 
     static const char* emptyString;

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectList.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectList.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectList.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectList.h Mon Nov 27 06:26:49 2006
@@ -55,15 +55,15 @@
      * with their correct type using the list getInteger(index) api.
      */
 
-    virtual SDO_API DataObjectPtr operator[] (int pos) = 0;
-    virtual SDO_API const DataObjectPtr operator[] (int pos) const = 0;
+    virtual SDO_API DataObjectPtr operator[] (unsigned int pos) = 0;
+    virtual SDO_API const DataObjectPtr operator[] (unsigned int pos) const = 0;
 
     /**  size returns the number of elements.
      *
      * The size method returns the number of elements in the list
      */
 
-    virtual SDO_API int size () const = 0;
+    virtual SDO_API unsigned int size () const = 0;
 
     /**  getBoolean returns a boolean at an index
      *

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp Mon Nov 27 06:26:49 2006
@@ -140,13 +140,13 @@
     }
 }
 
-RefCountingPointer<DataObject> DataObjectListImpl::operator[] (int pos)
+RefCountingPointer<DataObject> DataObjectListImpl::operator[] (unsigned int pos)
 {
     validateIndex(pos);
     return plist[pos];
 }
 
-const RefCountingPointer<DataObject> DataObjectListImpl::operator[] (int pos) const
+const RefCountingPointer<DataObject> DataObjectListImpl::operator[] (unsigned int pos) const
 {
     validateIndex(pos);
     RefCountingPointer<DataObjectImpl> d = plist[pos];
@@ -155,7 +155,7 @@
 }
 
 
-int DataObjectListImpl::size () const
+unsigned int DataObjectListImpl::size () const
 {
     return plist.size();
 }
@@ -203,7 +203,7 @@
     {
         container->logChange(pindex);
     }
-    for (int i=0;i < plist.size(); i++)
+    for (unsigned int i=0;i < plist.size(); i++)
     {
         if (plist[i] == d)
         {
@@ -355,7 +355,7 @@
                 if (pi != 0)
                 {
                     unsigned int subcount = pi->getSubstitutionCount();
-                    for (int i=0;i<subcount;i++)
+                    for (unsigned int i=0;i<subcount;i++)
                     {
                         const Type* tsub = pi->getSubstitutionType(i);
                         if (tsub != 0 && tsub->equals(objectType)) return;
@@ -438,7 +438,7 @@
         container->logChange(pindex);
     }
 
-    for (int i=0;i < plist.size(); i++)
+    for (unsigned int i=0;i < plist.size(); i++)
     {
         if (plist[i] == d)
         {
@@ -841,7 +841,7 @@
     return d;
 }
 
-void DataObjectListImpl::validateIndex(int index) const
+void DataObjectListImpl::validateIndex(unsigned int index) const
 {
     if ((index < 0) || (index >= size()))
     {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h Mon Nov 27 06:26:49 2006
@@ -62,8 +62,8 @@
     // open type support
     virtual void decrementPindex();
 
-    virtual DataObjectPtr operator[] (int pos);
-    virtual const DataObjectPtr operator[] (int pos) const;
+    virtual DataObjectPtr operator[] (unsigned int pos);
+    virtual const DataObjectPtr operator[] (unsigned int pos) const;
 
     // set/get primitive values 
     virtual bool getBoolean(unsigned int index) const;
@@ -99,7 +99,7 @@
 
     virtual unsigned int getLength(unsigned int index) const;
 
-    virtual int size () const;
+    virtual unsigned int size () const;
 
     virtual void insert (unsigned int index, DataObjectPtr d);
     virtual void append (DataObjectPtr d);
@@ -192,7 +192,7 @@
     unsigned int pindex;
     bool isReference;
 
-    void validateIndex(int index) const;
+    void validateIndex(unsigned int index) const;
 
     static const SDOString BooleanLiteral;
     static const SDOString ByteLiteral;

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp Mon Nov 27 06:26:49 2006
@@ -69,7 +69,7 @@
                     wchar_t * buft = new wchar_t[siz];
                     from->getString(p, buff, siz);
                     to->getString(p, buft, siz);
-                    for (int i=0;i< siz; i++)
+                    for (unsigned int i=0;i< siz; i++)
                     {
                         if (buff[i] != buft[i])
                         {
@@ -94,7 +94,7 @@
                     char * buft = new char[siz];
                     from->getBytes(p, buff, siz);
                     to->getBytes(p, buft, siz);
-                    for (int i=0;i< siz; i++)
+                    for (unsigned int i=0;i< siz; i++)
                     {
                         if (buff[i] != buft[i])
                         {
@@ -119,7 +119,7 @@
         {
         case Type::BooleanType:
         {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getBoolean(i) != from.getBoolean(i))
                 {
@@ -131,7 +131,7 @@
 
         case Type::ByteType:
         {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getByte(i) != from.getByte(i))
                 {
@@ -143,7 +143,7 @@
 
         case Type::CharacterType:
                 {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getCharacter(i) != from.getCharacter(i))
                 {
@@ -155,7 +155,7 @@
 
         case Type::IntegerType: 
                 {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getInteger(i) != from.getInteger(i))
                 {
@@ -167,7 +167,7 @@
 
         case Type::ShortType:
                 {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getShort(i) != from.getShort(i))
                 {
@@ -178,7 +178,7 @@
         }
     case Type::DoubleType:
         {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getDouble(i) != from.getDouble(i))
                 {
@@ -190,7 +190,7 @@
 
     case Type::FloatType:
         {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getFloat(i) != from.getFloat(i))
                 {
@@ -202,7 +202,7 @@
 
     case Type::LongType:
         {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getLong(i) != from.getLong(i))
                 {
@@ -214,7 +214,7 @@
     
     case Type::DateType:
         {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 if (to.getDate(i).getTime() != from.getDate(i).getTime())
                 {
@@ -229,7 +229,7 @@
     case Type::UriType:
     case Type::StringType:
         {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 unsigned int siz = from.getLength(i);
                 if (siz != to.getLength(i)) return false;
@@ -240,7 +240,7 @@
                     wchar_t * buft = new wchar_t[siz];
                     from.getString(i,buff,siz);
                     to.getString(i,buft,siz);
-                    for (int j=0;j<siz;j++)
+                    for (unsigned int j=0;j<siz;j++)
                     {
                         if (buff[j] != buft[j]) 
                         {
@@ -258,7 +258,7 @@
 
     case Type::BytesType:
         {
-            for (int i=0;i< from.size(); i++)
+            for (unsigned int i=0;i< from.size(); i++)
             {
                 unsigned int siz = from.getLength(i);
                 if (siz != to.getLength(i)) return false;
@@ -269,7 +269,7 @@
                     char * buft = new char[siz];
                     from.getBytes(i,buff,siz);
                     to.getBytes(i,buft,siz);
-                    for (int j=0;j<siz;j++)
+                    for (unsigned int j=0;j<siz;j++)
                     {
                         if (buff[j] != buft[j]) 
                         {
@@ -310,7 +310,7 @@
 
     
         PropertyList pl = dataObject1->getInstanceProperties();
-        for (int i=0;i < pl.size(); i++)
+        for (unsigned int i=0;i < pl.size(); i++)
         {
             // data objects are only compared the deep equality case
             if (pl[i].getType().isDataObjectType())
@@ -327,7 +327,7 @@
                         DataObjectList& dolnew = dataObject2->getList(pl[i]);
                         if (dolnew.size() != dolold.size()) return false;
 
-                        for (int i=0;i< dolold.size(); i++)
+                        for (unsigned int i=0;i< dolold.size(); i++)
                         {
                             if (!internalEqual(dolold[i], dolnew[i], true))
                             {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp Mon Nov 27 06:26:49 2006
@@ -105,7 +105,7 @@
              return propertydefinition->substituteNames.size();
          }
 
-         const char* PropertyDefinition::getSubstituteNames(int index) const
+         const char* PropertyDefinition::getSubstituteNames(unsigned int index) const
          {
              if (index >= 0 && index < propertydefinition->substituteNames.size())
              {
@@ -114,7 +114,7 @@
              return 0;
          }
 
-         const char* PropertyDefinition::getSubstituteLocalNames(int index) const
+         const char* PropertyDefinition::getSubstituteLocalNames(unsigned int index) const
          {
              if (index >= 0 && index < propertydefinition->substituteLocalNames.size())
              {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h Mon Nov 27 06:26:49 2006
@@ -73,8 +73,8 @@
             /*SDO_API*/ void addSubstitute(const SDOString& name,
                 const SDOString& localname);
             /*SDO_API*/ int getSubstituteCount() const;
-            /*SDO_API*/ const char* getSubstituteNames(int index) const;
-            /*SDO_API*/ const char* getSubstituteLocalNames(int index) const;
+            /*SDO_API*/ const char* getSubstituteNames(unsigned int index) const;
+            /*SDO_API*/ const char* getSubstituteLocalNames(unsigned int index) const;
 
             
             /*SDO_API*/ void setAliases(const char* aliases);

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp Mon Nov 27 06:26:49 2006
@@ -266,7 +266,7 @@
        ///////////////////////////////////////////////////////////////////////////
     const Type* PropertyImpl::getSubstitutionType(const char* inname) const 
     {
-        for (int i=0;i<substitutions.size();i++)
+        for (unsigned int i=0;i<substitutions.size();i++)
         {
             if (!strcmp(inname, substitutions[i].name.c_str()))
             {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp Mon Nov 27 06:26:49 2006
@@ -74,7 +74,7 @@
     return *(plist[pos]);
 }
 
-SDO_API int PropertyList::size () 
+SDO_API unsigned int PropertyList::size () 
 {
     return plist.size();
 }

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/PropertyList.h Mon Nov 27 06:26:49 2006
@@ -71,7 +71,7 @@
      * size() returns the number of elements in the list.
      */
 
-    SDO_API int size ();
+    SDO_API unsigned int size ();
     
     /**  insert adds an element to the list
      *

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp Mon Nov 27 06:26:49 2006
@@ -61,7 +61,7 @@
 
         const SAX2Attribute* SAX2Attributes::getAttribute(const SDOXMLString& attributeName) const
         {
-            for (int i=0; i < attributes.size(); i++)
+            for (unsigned int i=0; i < attributes.size(); i++)
             {
                 if (attributes[i].getName().equalsIgnoreCase(attributeName))
                 {
@@ -73,7 +73,7 @@
 
         void SAX2Attributes::addAttribute(const SAX2Attribute& attr)
         {
-            for (int i=0; i < attributes.size(); i++)
+            for (unsigned int i=0; i < attributes.size(); i++)
             {
                 if (attributes[i].getUri().equals(attr.getUri()))
                 {                    
@@ -95,7 +95,7 @@
             const SDOXMLString& attributeUri,
             const SDOXMLString& attributeName) const
         {
-            for (int i=0; i < attributes.size(); i++)
+            for (unsigned int i=0; i < attributes.size(); i++)
             {
                 if (attributes[i].getUri().equalsIgnoreCase(attributeUri))
                 {                    
@@ -112,7 +112,7 @@
         const SDOXMLString& SAX2Attributes::getValue(
             const SDOXMLString& attributeName) const
         {
-            for (int i=0; i < attributes.size(); i++)
+            for (unsigned int i=0; i < attributes.size(); i++)
             {
                 if (attributes[i].getName().equalsIgnoreCase(attributeName))
                 {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp Mon Nov 27 06:26:49 2006
@@ -500,7 +500,7 @@
             ctxt = xmlCreatePushParserCtxt(handler, this,
                 bctx, bcount, NULL);
             
-            for (int i=0;i<buffer_vec.size();i++)
+            for (unsigned int i=0;i<buffer_vec.size();i++)
             {
                 if (buffer_vec[i].len > 0)
                 {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp Mon Nov 27 06:26:49 2006
@@ -1451,7 +1451,7 @@
             */
 
             PropertyList pl = type.getProperties();
-            for (int i = 0; i < pl.size(); i++)
+            for (unsigned int i = 0; i < pl.size(); i++)
             {
                 XSDPropertyInfo* pi = (XSDPropertyInfo*)((DASProperty*)&pl[i])->getDASValue("XMLDAS::PropertyInfo");
                 if (pi)
@@ -1460,7 +1460,7 @@
                     if (localName .equals(propdef.localname))
                         return propdef.name;
 
-                    for (int j=0;j< propdef.substituteNames.size();j++)
+                    for (unsigned int j=0;j< propdef.substituteNames.size();j++)
                     {
                         if (propdef.substituteLocalNames[j].equals(localName))
                         {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp Mon Nov 27 06:26:49 2006
@@ -94,7 +94,7 @@
             bool isGroup,
             const SAX2Attributes& groupAttributes)
         {
-            for (int i=0;i< groupList.size(); i++)
+            for (unsigned int i=0;i< groupList.size(); i++)
             {
                 if (groupList[i].isAttributeGroup != isGroup)
                 {
@@ -117,7 +117,7 @@
 
                         int level = 0;
 
-                        for (int j=0;j< groupList[i].events.size();j++)
+                        for (unsigned int j=0;j< groupList[i].events.size();j++)
                         {
                             if (groupList[i].events[j].isStartEvent)
                             {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp Mon Nov 27 06:26:49 2006
@@ -118,7 +118,7 @@
 
         void SDOUtils::printTabs(ostream& out, unsigned int incr)
         {
-            for (int ind=0; ind < incr; ind++)
+            for (unsigned int ind=0; ind < incr; ind++)
             {
                 out << "  ";
             }
@@ -155,7 +155,7 @@
             // Iterate over all the properties
             //////////////////////////////////////////////////////////////
             PropertyList pl = dataObject->getInstanceProperties();
-            for (int i = 0; i < pl.size(); i++)
+            for (unsigned int i = 0; i < pl.size(); i++)
             {
                 printTabs(out, incr);
                 out << "Property: " << pl[i].getName() << endl;
@@ -179,7 +179,7 @@
                         incr++;
                         DataObjectList& dol = dataObject->getList(pl[i]);
                         char cc[20];
-                        for (int j = 0; j <dol.size(); j++)
+                        for (unsigned int j = 0; j <dol.size(); j++)
                         {
                             printTabs(out, incr);
                             // seems to be a bug in ostream? Will not print j 
@@ -231,13 +231,13 @@
         void SDOUtils::printTypes(std::ostream& out, DataFactoryPtr df) 
         {
             TypeList tl = df->getTypes();
-            for (int i = 0; i < tl.size(); i++)
+            for (unsigned int i = 0; i < tl.size(); i++)
             {
                 out << "Type: " << tl[i].getURI()<< "#" << tl[i].getName() <<
                     " isOpen: " << tl[i].isOpenType()
                     << " isSequenced: " << tl[i].isSequencedType() << endl;
                 PropertyList pl = tl[i].getProperties();
-                for (int j = 0; j < pl.size(); j++)
+                for (unsigned int j = 0; j < pl.size(); j++)
                 {
                     out << "\tProperty: " << pl[j].getName()
                         << " type: " <<pl[j].getType().getURI()<<"#"<<pl[j].getType().getName()<<

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp Mon Nov 27 06:26:49 2006
@@ -174,7 +174,7 @@
         {
             char* newString = new char[strlen(*this)+1];
             strcpy(newString, *this);
-            for (int i = start; (i<=(strlen(newString)) && i < length); i++)
+            for (unsigned int i = start; (i<=(strlen(newString)) && i < length); i++)
             {
                 newString[i] = tolower(newString[i]);
             }

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp Mon Nov 27 06:26:49 2006
@@ -497,7 +497,7 @@
             const SDOXMLString& elementName,
             ChangeSummaryPtr cs)
         {
-            int i;
+            unsigned int i;
             int rc; 
 
             ChangedDataObjectList& changedDOs =  cs->getChangedDataObjects();
@@ -587,7 +587,7 @@
             }
 
             PropertyList pl = dob->getInstanceProperties();
-            for (int i = 0; i < pl.size(); i++)
+            for (unsigned int i = 0; i < pl.size(); i++)
             {
                 if (!dob->isSet(pl[i]))continue;
 
@@ -596,7 +596,7 @@
                     if (!pl[i].getType().isDataType())
                     {
                         DataObjectList& dl = dob->getList(pl[i]);
-                        for (int k=0;k< dl.size() ;k++)
+                        for (unsigned int k=0;k< dl.size() ;k++)
                         {
                             DataObjectImpl* d = (DataObjectImpl*)(DataObject*)dl[k];
                             if (d != 0)addToNamespaces(d);
@@ -941,8 +941,8 @@
             //////////////////////////////////////////////////////////////////////////
             // Iterate over all the properties to find attributes
             //////////////////////////////////////////////////////////////////////////
-            int i;
-            int j = 1;
+            unsigned int i;
+            unsigned int j = 1;
             PropertyList pl = dataObject->getInstanceProperties();
             for (i = 0; i < pl.size(); i++)
             {
@@ -1128,7 +1128,7 @@
                         if (pl[i].isMany())
                         {
                             DataObjectList& dol = dataObject->getList(pl[i]);
-                            for (int j = 0; j <dol.size(); j++)
+                            for (unsigned int j = 0; j <dol.size(); j++)
                             {
                                 // Handle non-containment reference to DataObject
                                 if (pl[i].isReference() )

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp Mon Nov 27 06:26:49 2006
@@ -163,7 +163,7 @@
         int SDOXSDWriter::write(const TypeList& types, const SDOXMLString& targetNamespaceURI,
                                 const propertyMap& openprops, int indent)
         {
-            int i;
+            unsigned int i;
             if (writer == NULL)
             {
                 // Throw exception
@@ -309,7 +309,7 @@
                     {
                         unsigned int j = type.getAliasCount();
                         SDOXMLString value = "";
-                        for (int i=0;i<j-1;i++)
+                        for (unsigned int i=0;i<j-1;i++)
                         {
                             value = value + type.getAlias(i);
                             value = value + " ";
@@ -380,7 +380,7 @@
                     {
                         unsigned int j = type.getAliasCount();
                         SDOXMLString value = "";
-                        for (int i=0;i<j-1;i++)
+                        for (unsigned int i=0;i<j-1;i++)
                         {
                             value = value + type.getAlias(i);
                             value = value + " ";
@@ -421,7 +421,7 @@
                         // Create <element> definitions 
                         // -------------------------------------------------------
                         
-                        int j;
+                        unsigned int j;
                         for (j = 0; j < pl.size(); j++)
                         {
                             const Property& prop = pl[j];
@@ -513,7 +513,7 @@
                                 {
                                     unsigned int j = prop.getAliasCount();
                                     SDOXMLString value = "";
-                                    for (int i=0;i<j-1;i++)
+                                    for (unsigned int i=0;i<j-1;i++)
                                     {
                                         value = value + prop.getAlias(i);
                                         value = value + " ";

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp Mon Nov 27 06:26:49 2006
@@ -639,7 +639,7 @@
     {\
         SEQUENCE_ITEM_LIST::iterator i;\
         SEQUENCE_ITEM_LIST::iterator i2 = the_list.end();\
-        int j;\
+        unsigned int j;\
         if (index >= the_list.size()) {\
             return add##primtype(p,v);\
         }\
@@ -701,7 +701,7 @@
     {\
         SEQUENCE_ITEM_LIST::iterator i;\
         SEQUENCE_ITEM_LIST::iterator i2 = the_list.end();\
-        int j;\
+        unsigned int j;\
         if (index >= the_list.size()) {\
             return add##primtype(p,v);\
         }\
@@ -837,7 +837,7 @@
             msg.c_str());
         }
         SEQUENCE_ITEM_LIST::iterator i;
-        int j = 0;
+        unsigned int j = 0;
         for (i=the_list.begin();(j < index) && (i != the_list.end()) ; ++i)
         {
             j++;
@@ -890,7 +890,7 @@
         SEQUENCE_ITEM_LIST::iterator i1,
                             i2 = the_list.end(), 
                             i3 = the_list.end();
-        int j = 0;
+        unsigned int j = 0;
         for (i3 = the_list.begin(); 
              j < toIndex && j < fromIndex && 
                  i3 != the_list.end() ; ++i3);
@@ -932,7 +932,7 @@
             return false;
         }
         SEQUENCE_ITEM_LIST::iterator i;
-        int j = 0;
+        unsigned int j = 0;
         for (i= the_list.begin(); (j < index) && (i != the_list.end()); ++i)
         {
             j++;
@@ -952,7 +952,7 @@
         }
 
         SEQUENCE_ITEM_LIST::iterator i;
-        int j = 0;
+        unsigned int j = 0;
         for (i= the_list.begin(); (j < index) && (i != the_list.end()); ++i)
         {
             j++;
@@ -973,7 +973,7 @@
         }
 
         SEQUENCE_ITEM_LIST::iterator i;
-        int j = 0;
+        unsigned int j = 0;
         for (i= the_list.begin(); (j < index) && (i != the_list.end()); ++i)
         {
             j++;

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.cpp Mon Nov 27 06:26:49 2006
@@ -61,12 +61,12 @@
 }
 
 
-SDO_API const Type& TypeList::operator[] (int pos) const
+SDO_API const Type& TypeList::operator[] (unsigned int pos) const
 {
     return *plist[pos];
 }
 
-SDO_API int TypeList::size () const
+SDO_API unsigned int TypeList::size () const
 {
     return plist.size();
 }

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeList.h Mon Nov 27 06:26:49 2006
@@ -48,8 +48,8 @@
     SDO_API TypeList(std::vector<const Type*> p);
     SDO_API TypeList();
     virtual SDO_API ~TypeList();
-    SDO_API const Type& operator[] (int pos) const;
-    SDO_API int size () const;
+    SDO_API const Type& operator[] (unsigned int pos) const;
+    SDO_API unsigned int size () const;
     SDO_API void insert (const Type* t);
 };
 };

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelper.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelper.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelper.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelper.h Mon Nov 27 06:26:49 2006
@@ -166,7 +166,7 @@
              * may be errors to report or handle.
              */
 
-            virtual int  getErrorCount() const = 0;
+            virtual unsigned int  getErrorCount() const = 0;
 
             /** getErrorMessage gets the nth error message
              *
@@ -174,7 +174,7 @@
              * in which the parser error occurred.
              */
 
-            virtual const char* getErrorMessage(int errnum) const = 0;
+            virtual const char* getErrorMessage(unsigned int errnum) const = 0;
 
             
         };

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp Mon Nov 27 06:26:49 2006
@@ -134,7 +134,7 @@
         }
 
         const TypeList& tl = df->getTypes();
-        for (int i = 0; i < tl.size(); i++)
+        for (unsigned int i = 0; i < tl.size(); i++)
         {
            if (!strcmp("RootType", tl[i].getName()))
            {
@@ -448,13 +448,13 @@
                 indent);
         }
 
-        int XMLHelperImpl::getErrorCount() const
+        unsigned int XMLHelperImpl::getErrorCount() const
         {
             return parseErrors.size();
         }
 
 
-        const char* XMLHelperImpl::getErrorMessage(int errnum) const
+        const char* XMLHelperImpl::getErrorMessage(unsigned int errnum) const
         {
             if (errnum >= 0 && errnum < parseErrors.size())
             {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h Mon Nov 27 06:26:49 2006
@@ -54,8 +54,8 @@
             // Destructor
             virtual ~XMLHelperImpl();
             
-            virtual int  getErrorCount() const;
-            virtual const char*  getErrorMessage(int errnum) const;
+            virtual unsigned int  getErrorCount() const;
+            virtual const char*  getErrorMessage(unsigned int errnum) const;
             virtual void setError(const char* error);
 
 

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelper.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelper.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelper.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelper.h Mon Nov 27 06:26:49 2006
@@ -122,7 +122,7 @@
              * may be errors to report or handle.
              */
 
-            virtual int  getErrorCount() const = 0;
+            virtual unsigned int  getErrorCount() const = 0;
 
             /** getErrorMessage gets the nth error message
              *
@@ -130,7 +130,7 @@
              * in which the parser error occurred.
              */
 
-            virtual const char* getErrorMessage(int errnum) const = 0;
+            virtual const char* getErrorMessage(unsigned int errnum) const = 0;
 
             /**
              *

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp Mon Nov 27 06:26:49 2006
@@ -141,7 +141,7 @@
                             prop.typeUri : prop.substituteUri; 
                 const Type& rootType = dataFactory->getType(typeUri, entryName);
                 PropertyList pl = rootType.getProperties();
-                for (int j = 0; j < pl.size(); j++)
+                for (unsigned int j = 0; j < pl.size(); j++)
                 {
                     if (!pl[j].getType().isDataType()
                         && strcmp(pl[j].getType().getURI(),Type::SDOTypeNamespaceURI.c_str()))
@@ -188,7 +188,7 @@
                 const Type* rootType = df->findType(typeUri,"RootType");
                 if (rootType == 0) return;
                 PropertyList pl = rootType->getProperties();
-                for (int j = 0; j < pl.size(); j++)
+                for (unsigned int j = 0; j < pl.size(); j++)
                 {
                     XSDPropertyInfo* pi = (XSDPropertyInfo*)
                     ((DASProperty*)&pl[j])->getDASValue("XMLDAS::PropertyInfo");
@@ -342,7 +342,7 @@
                             (const char*)ty.name,
                             (const char*)ty.parentTypeUri,
                             (const char*)ty.parentTypeName,
-                            (const char*)ty.isRestriction);
+                            ty.isRestriction);
                     }        
                     catch (SDORuntimeException& e)
                     {
@@ -395,7 +395,7 @@
                                 const Type& rootType = dataFactory->getType(prop.typeUri, "RootType");
                                 PropertyList pl = rootType.getProperties();
 
-                                for (int j = 0; j < pl.size(); j++)
+                                for (unsigned int j = 0; j < pl.size(); j++)
                                 {
                                     
                                     XSDPropertyInfo* pi = (XSDPropertyInfo*)
@@ -444,9 +444,9 @@
                             (const char*)prop.name,
                             (const char*)prop.typeUri,
                             (const char*)prop.typeName,
-                            (const char*)prop.isMany,
-                            (const char*)prop.isReadOnly,
-                            (const char*)prop.isContainment);
+                            prop.isMany,
+                            prop.isReadOnly,
+                            prop.isContainment);
 
                         LOGINFO_1(INFO,"XSDHelper adds property %s",(const char*)(prop.name));
 
@@ -611,13 +611,13 @@
             return retString;
         }
 
-        int XSDHelperImpl::getErrorCount() const
+        unsigned int XSDHelperImpl::getErrorCount() const
         {
             return parseErrors.size();
         }
 
 
-        const char* XSDHelperImpl::getErrorMessage(int errnum) const
+        const char* XSDHelperImpl::getErrorMessage(unsigned int errnum) const
         {
             if (errnum >= 0 && errnum < parseErrors.size())
             {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h Mon Nov 27 06:26:49 2006
@@ -77,7 +77,7 @@
              * may be errors to report or handle.
              */
 
-            virtual int  getErrorCount() const;
+            virtual unsigned int  getErrorCount() const;
 
             /** getErrorMessage gets the nth error message
              *
@@ -85,7 +85,7 @@
              * in which the parser error occurred.
              */
 
-            virtual const char* getErrorMessage(int errnum) const;
+            virtual const char* getErrorMessage(unsigned int errnum) const;
             virtual void setError(const char* error);
             
             /**  generate buildsXSD from types/properties

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/SdoGenerate.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/SdoGenerate.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/SdoGenerate.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/SdoGenerate.cpp Mon Nov 27 06:26:49 2006
@@ -67,7 +67,7 @@
        
         cout << "// Generated structures " << endl;
 
-        for (int i=0;i<tl.size();i++)
+        for (unsigned int i=0;i<tl.size();i++)
         {
 
             if (!strcmp(tl[i].getURI(),"commonj.sdo")) continue;
@@ -82,7 +82,7 @@
 
 
             PropertyList pl = tl[i].getProperties();
-            for (int j=0;j<pl.size();j++)
+            for (unsigned int j=0;j<pl.size();j++)
             {
                 if (pl[j].isMany())
                 {

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp Mon Nov 27 06:26:49 2006
@@ -1553,7 +1553,7 @@
     if (lenw > 0) {
         char* tw = new char[lenw];
         test->getBytes("string",tw,lenw);
-        for (int i=0;i<lenw;i++)
+        for (unsigned int i=0;i<lenw;i++)
         {
             fprintf(f,"%c",tw[i]);
         }
@@ -1565,7 +1565,7 @@
     if (len > 0) {
         char* tc = new char[len];
         test->getBytes("bytes",tc,len);
-        for (int i=0;i<len;i++)
+        for (unsigned int i=0;i<len;i++)
         {
             fprintf(f,"%c", tc[i]);
         }
@@ -1708,7 +1708,7 @@
     if (lenw > 0) {
         char* tw = new char[lenw];
         test->getBytes("string",tw,lenw);
-        for (int i=0;i<lenw;i++)
+        for (unsigned int i=0;i<lenw;i++)
         {
             fprintf(f,"%c",tw[i]);
         }
@@ -1720,7 +1720,7 @@
     if (len > 0) {
         char* tc = new char[len];
         test->getBytes("bytes",tc,len);
-        for (int i=0;i<len;i++)
+        for (unsigned int i=0;i<len;i++)
         {
             fprintf(f,"%c", tc[i]);
         }
@@ -1802,7 +1802,7 @@
         wchar_t * buf = new wchar_t[l+1];
         l = pstring.getStringDefault(buf,l);
         fprintf(f, "String default length is %d\n", l);
-        for (int i=0;i<l;i++)
+        for (unsigned int i=0;i<l;i++)
         {
             fprintf(f, "%c",buf[i]);
         }
@@ -1823,7 +1823,7 @@
         char * buf = new char[l+1];
         l = pbytes.getBytesDefault(buf,l);
         fprintf(f, "Bytes default length is %d\n",l);
-        for (int i=0;i<l;i++)
+        for (unsigned int i=0;i<l;i++)
         {
             fprintf(f, "%c", buf[i]);
         }
@@ -1954,7 +1954,7 @@
      
     try {
 
-    int i;
+    unsigned int i;
     DataFactoryPtr mdg  = DataFactory::getDataFactory();
  
     mdg->addType("myspace","NullTest",true, false); // sequenced
@@ -2305,7 +2305,7 @@
 int sdotest::maintest()
 {
 
-    int i;
+    unsigned int i;
 
     FILE *f;
 
@@ -2495,7 +2495,7 @@
 
         fprintf(f, "Should be 3: %d\n", tlf.getAliasCount());
 
-        for (int ai = 0; ai < tlf.getAliasCount(); ai++)
+        for (unsigned int ai = 0; ai < tlf.getAliasCount(); ai++)
         {
             fprintf(f, "Alias: %s\n",tlf.getAlias(ai));
         }
@@ -2666,7 +2666,7 @@
 
         sq->addText(" - should say now able to set\n");
 
-        for (int ii=0;ii<sq->size();ii++)
+        for (unsigned int ii=0;ii<sq->size();ii++)
         {
             fprintf(f, "%s\n", sq->getCStringValue(ii));
         }
@@ -2947,7 +2947,7 @@
 
         fprintf(f, "%s\n", snew2.c_str());
 
-        for (int lx = 0; lx < deps.size(); lx++)
+        for (unsigned int lx = 0; lx < deps.size(); lx++)
         {
             fprintf(f, "Department: %s\n",deps[lx]->getCString("name"));
         }
@@ -3862,7 +3862,7 @@
 int sdotest::dumpproperties(FILE *f, DataObjectPtr root)
 {
     PropertyList pl = root->getInstanceProperties();
-    for (int i=0;i<pl.size();i++)
+    for (unsigned int i=0;i<pl.size();i++)
     {
         if (pl[i].isMany())
         {
@@ -3870,7 +3870,7 @@
             if (pl[i].getType().isDataType())
             {
                 char buf[10];
-                for (int j=0;j<dl.size();j++)
+                for (unsigned int j=0;j<dl.size();j++)
                 {
 
                     sprintf(buf,"%02d",j);
@@ -3881,7 +3881,7 @@
             else
             {
                 fprintf(f,"MObject Property %s\n",pl[i].getName());
-                for (int j=0;j<dl.size();j++)
+                for (unsigned int j=0;j<dl.size();j++)
                 {
                     if (dl[j] != 0)
                     {
@@ -3977,7 +3977,7 @@
     dol.append(SDODate(2000));
     dol.append(SDODate(4000));
 
-    for (int i=0;i < dol.size(); i++)
+    for (unsigned int i=0;i < dol.size(); i++)
     {
         fprintf(f,"Review number:%d was:%d\n", i,dol.getDate(i).getTime());
 
@@ -5410,7 +5410,7 @@
     // unknown list type at present..
     DataObjectList& dl = emp1->getList("opentypelist");
     
-    int i = 45;
+    unsigned int i = 45;
     dl.append((short)i); // now the list must be primitive
 
     // we should now have instance properties 
@@ -6460,7 +6460,7 @@
 
         XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
 
-        for (int i=0;i<properties.size();i++)
+        for (unsigned int i=0;i<properties.size();i++)
         {
             Property& prop = properties[i];
             switch (prop.getTypeEnum())
@@ -6476,7 +6476,7 @@
                     {
                         // many valued property, such as Requests , so get the list
                         DataObjectList& rq = search->getList(prop);
-                        for (int j=0;j<rq.size();j++)
+                        for (unsigned int j=0;j<rq.size();j++)
                         {
                             DataObjectPtr dob = rq[j];
                             if (dob != 0)
@@ -6677,7 +6677,7 @@
 {
     try {
 
-        int i,j;
+        unsigned int i,j;
 
         FILE *f = fopen("testerrors.dat","w+");
         if (f == 0)
@@ -6729,7 +6729,7 @@
 {
     try {
 
-        int i,j;
+        unsigned int i,j;
 
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
 
@@ -6813,7 +6813,7 @@
 {
     try {
 
-        int i,j;
+        unsigned int i,j;
 
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
 
@@ -7070,7 +7070,7 @@
     // bool previously unset, and a int list previuously unset and an employees list
     // previously unset
     
-    for (int i=0;i< cdl.size();i++)
+    for (unsigned int i=0;i< cdl.size();i++)
     {
         if (cs->isModified(cdl[i]))
         {
@@ -7234,7 +7234,7 @@
 {
     try 
     {
-        int i,j;
+        unsigned int i,j;
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
         FILE* f = fopen("company_with_nillable_SN.xsd","r+");
         char* buffer = new char[4000];
@@ -7285,7 +7285,7 @@
 {
     try 
     {
-        int i,j;
+        unsigned int i,j;
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
 
         XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
@@ -7620,7 +7620,7 @@
 {
     try 
     {
-        int i,j;
+        unsigned int i,j;
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
 
         XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
@@ -7653,7 +7653,7 @@
 {
     try 
     {
-        int i,j;
+        unsigned int i,j;
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
 
         XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
@@ -7735,7 +7735,7 @@
 
         PropertyList pl = t.getProperties();
 
-        for (int i=0;i<pl.size();i++)
+        for (unsigned int i=0;i<pl.size();i++)
         {
             fprintf(f,"Property:%s\n", pl[i].getName());
         }
@@ -7757,7 +7757,7 @@
 
         PropertyList pl2 = t2.getProperties();
 
-        for (int j=0;j<pl2.size();j++)
+        for (unsigned int j=0;j<pl2.size();j++)
         {
             fprintf(f,"Property:%s\n",pl2[j].getName());
             fprintf(f, "Value:%s\n", dob2->getCString(pl2[j]));
@@ -7775,7 +7775,7 @@
 
 int sdotest::b47137b()
 {
-    int i,j;
+    unsigned int i,j;
     try 
     {
 
@@ -7808,7 +7808,7 @@
         }
 
         TypeList tl = mdg->getTypes();
-        for (int k=0;k<tl.size();k++)
+        for (unsigned int k=0;k<tl.size();k++)
         {
             fprintf(f,"Type:%s#%s\n",tl[k].getURI(),tl[k].getName());
         }
@@ -7819,7 +7819,7 @@
 
         PropertyList pl = t.getProperties();
 
-        for (int i=0;i<pl.size();i++)
+        for (unsigned int i=0;i<pl.size();i++)
         {
             fprintf(f, "Property:%s\n",pl[i].getName());
         }
@@ -7843,7 +7843,7 @@
 
         PropertyList pl2 = t2.getProperties();
 
-        for (int j=0;j<pl2.size();j++)
+        for (unsigned int j=0;j<pl2.size();j++)
         {
 
             fprintf(f,"Property:%s\n",pl2[j].getName());
@@ -7874,7 +7874,7 @@
 
 int sdotest::b47293()
 {
-    int i,j,k;
+    unsigned int i,j,k;
     try 
     {
         FILE *f = fopen("b47293.dat","w+");
@@ -8259,7 +8259,7 @@
 {
     try {
 
-        int i,j,k;
+        unsigned int i,j,k;
 
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
     
@@ -8314,7 +8314,7 @@
 {
     try {
 
-        int i,j;
+        unsigned int i,j;
 
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
 
@@ -8420,7 +8420,7 @@
 {
     try {
 
-        int i,j;
+        unsigned int i,j;
 
         FILE *f = fopen("travel.dat","w+");
         if (f == 0)
@@ -8488,7 +8488,7 @@
 {
     try {
 
-        int i,j;
+        unsigned int i,j;
 
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
 
@@ -8649,7 +8649,7 @@
 {
     try {
 
-        int i,j;
+        unsigned int i,j;
         DataFactoryPtr mdg  = DataFactory::getDataFactory();
 
         XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
@@ -8710,7 +8710,7 @@
 int sdotest::testastyle(FILE *f, const char* style)
 {
 
-    int i,j;
+    unsigned int i,j;
 
 
     DataFactoryPtr mdg  = DataFactory::getDataFactory();
@@ -8744,7 +8744,7 @@
         if (!strcmp(tl[i].getName(),"library"))
         {
             PropertyList pl = tl[i].getProperties();
-            for (int j=0;j<pl.size();j++)
+            for (unsigned int j=0;j<pl.size();j++)
             {
                 fprintf(f,"Property:%s\n",pl[j].getName());
             }
@@ -8814,7 +8814,7 @@
 {
 
 
-    int i,j;
+    unsigned int i,j;
 
     try {
 
@@ -8854,7 +8854,7 @@
     {
         fprintf(f, "Type:%s#%s\n", tl[i].getURI(),tl[i].getName());
         PropertyList pl = tl[i].getProperties();
-        for (int j=0;j<pl.size();j++)
+        for (unsigned int j=0;j<pl.size();j++)
         {
             fprintf(f,"Property:%s\n",pl[j].getName());
         }
@@ -8885,7 +8885,7 @@
                        const char* name2)
 {
 
-    int i,j;
+    unsigned int i,j;
 
     try {
 
@@ -8945,7 +8945,7 @@
         if (!strcmp(tl[i].getURI(),"commonj.sdo")) continue;
         fprintf(f,"Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
         PropertyList pl = tl[i].getProperties();
-        for (int j=0;j<pl.size();j++)
+        for (unsigned int j=0;j<pl.size();j++)
         {
             fprintf(f,"Property:%s\n", pl[j].getName());
         }
@@ -8968,7 +8968,7 @@
 {
 
 
-    int i,j;
+    unsigned int i,j;
 
     try {
 
@@ -9010,7 +9010,7 @@
         if (!strcmp(tl[i].getURI(),"commonj.sdo")) continue;
         fprintf(f, "Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
         PropertyList pl = tl[i].getProperties();
-        for (int j=0;j<pl.size();j++)
+        for (unsigned int j=0;j<pl.size();j++)
         {
             fprintf(f,"Property:%s\n",pl[j].getName());
             fprintf(f, "Type of property:%s\n",pl[j].getType().getName());
@@ -9072,8 +9072,8 @@
        * succeed, but errors indicate some elements were not
        * understood 
        */
-      int i = 0;
-      int j = 0;
+      unsigned int i = 0;
+      unsigned int j = 0;
       if ((i = myXSDHelper->getErrorCount()) > 0)
       {
 	 cout << "XSD Loading reported some errors:" << endl;

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp Mon Nov 27 06:26:49 2006
@@ -525,7 +525,8 @@
 {
 
 
-    int i,j,rc;
+    unsigned int i,j;
+	int rc;
 
     try {
 
@@ -599,7 +600,7 @@
             {
                 fprintf(f1,"Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
                 PropertyList pl = tl[i].getProperties();
-                for (int j=0;j<pl.size();j++)
+                for (unsigned int j=0;j<pl.size();j++)
                 {
                     fprintf(f1,"Property:%s ",pl[j].getName());
                     if (pl[j].isMany())
@@ -686,7 +687,7 @@
             {
                 fprintf(f2,"Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
                 PropertyList pl = tl[i].getProperties();
-                for (int j=0;j<pl.size();j++)
+                for (unsigned int j=0;j<pl.size();j++)
                 {
                     fprintf(f2, "Property:%s ",pl[j].getName());
                     if (pl[j].isMany())
@@ -726,7 +727,7 @@
 {
 
 
-    int i,j;
+    unsigned int i,j;
 
     try {
 
@@ -811,7 +812,7 @@
         {
             fprintf(f1,"Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
             PropertyList pl = tl[i].getProperties();
-            for (int j=0;j<pl.size();j++)
+            for (unsigned int j=0;j<pl.size();j++)
             {
                 fprintf(f1,"Property:%s ",pl[j].getName());
                 if (pl[j].isMany())
@@ -1282,7 +1283,7 @@
 {
 
 
-    int i,j;
+    unsigned int i,j;
 
     try {
 
@@ -1329,7 +1330,7 @@
         {
             //printf("Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
             PropertyList pl = tl[i].getProperties();
-            for (int j=0;j<pl.size();j++)
+            for (unsigned int j=0;j<pl.size();j++)
             {
                 //printf("Property:%s ",pl[j].getName());
                 //if (pl[j].isMany())

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/utils.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/utils.cpp?view=diff&rev=479634&r1=479633&r2=479634
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/utils.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/utils.cpp Mon Nov 27 06:26:49 2006
@@ -141,11 +141,11 @@
 {
     TypeList tt = dd->getTypes();
     fprintf(f,"Printing Types\n");
-    for (int i = 0; i < tt.size(); ++i)
+    for (unsigned int i = 0; i < tt.size(); ++i)
     {
         fprintf(f,"Type %s\n",tt[i].getName());
         PropertyList pl = tt[i].getProperties();
-        for (int j = 0; j < pl.size() ; j++)
+        for (unsigned int j = 0; j < pl.size() ; j++)
         {
             fprintf(f,"Has Property %s of type %s\n",
                 pl[j].getName(),pl[j].getType().getName());
@@ -230,7 +230,7 @@
         return;
     }
 
-    for (int i=0;i<dobl.size();i++) {
+    for (unsigned int i=0;i<dobl.size();i++) {
 
     switch (p.getTypeEnum())
     {
@@ -356,7 +356,7 @@
         fprintf(f,"===== DataObject contents =====\n");
         PropertyList pl = dol->getInstanceProperties();
 
-        for (int j=0;j< pl.size(); j++)
+        for (unsigned int j=0;j< pl.size(); j++)
         {
             fprintf(f,"%s:",pl[j].getName());
             // this could be a many-valued property, and could be one which is
@@ -385,7 +385,7 @@
     // a changed and subsequently deleted object will not appear, but necessarily its
     // container will appear, so we can rebuild it.
 
-    for (int i=0;i< cdol.size();i++)
+    for (unsigned int i=0;i< cdol.size();i++)
     {
         if (cs->isCreated(cdol[i]))
         {
@@ -494,7 +494,7 @@
 int sdotest::printseq(FILE *f, SequencePtr sptr)
 {
     fprintf(f, "======================================\n");
-    for (int i=0;i< sptr->size();i++)
+    for (unsigned int i=0;i< sptr->size();i++)
     {
         try {
             if (!sptr->isText(i)) 



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