Index: cpp/frams/model/similarity/simil_match.cpp
===================================================================
--- cpp/frams/model/similarity/simil_match.cpp	(revision 358)
+++ cpp/frams/model/similarity/simil_match.cpp	(revision 361)
@@ -26,10 +26,9 @@
 
     // fill vectors with "unmatched" indicator
-    int i;
-    for (i = 0; i < (int) m_apvMatched[0]->size(); i++)
+	for (unsigned int i = 0; i < m_apvMatched[0]->size(); i++)
     {
         m_apvMatched[0]->operator[](i) = -1;
     }
-    for (i = 0; i < (int) m_apvMatched[1]->size(); i++)
+	for (unsigned int i = 0; i < m_apvMatched[1]->size(); i++)
     {
         m_apvMatched[1]->operator[](i) = -1;
@@ -149,6 +148,4 @@
     // index of the smallest object
     int nObj;
-    // index of an element
-    int nElem;
 
     // find the smallest object (its index)
@@ -163,5 +160,5 @@
 
     // check if all elements of the smallest object are matched
-    for (nElem = 0; nElem < (int) m_apvMatched[ nObj ]->size(); nElem++)
+	for (unsigned int nElem = 0; nElem < m_apvMatched[nObj]->size(); nElem++)
     {
         if (m_apvMatched[ nObj ]->operator[](nElem) < 0)
@@ -184,10 +181,9 @@
     // result - assume that matching is empty
     bool bResult = true;
-    int nElem;
 
     // matching is empty if either of objects has only unmatched elements
     // so it may be first object 
     int nObj = 0;
-    for (nElem = 0; nElem < (int) m_apvMatched[ nObj ]->size(); nElem++)
+	for (unsigned int nElem = 0; nElem < m_apvMatched[nObj]->size(); nElem++)
     {
         if (m_apvMatched[ nObj ]->operator[](nElem) >= 0)
@@ -207,10 +203,8 @@
 void SimilMatching::Empty()
 {
-    int iObj; // a counter of objects
-    int iElem; // a counter of objects' elements
-    for (iObj = 0; iObj < 2; iObj++)
+    for (int iObj = 0; iObj < 2; iObj++) // a counter of objects
     {
         // for each object in the matching
-        for (iElem = 0; iElem < (int) m_apvMatched[ iObj ]->size(); iElem++)
+		for (unsigned int iElem = 0; iElem < m_apvMatched[iObj]->size(); iElem++) // a counter of objects' elements
         {
             // for each element iElem for the object iObj
@@ -228,5 +222,4 @@
 void SimilMatching::PrintMatching()
 {
-    int i;
     int nBigger;
 
@@ -243,7 +236,7 @@
     // print first line - indices of objects
     printf("[ ");
-    for (i = 0; i < (int) m_apvMatched[ nBigger ]->size(); i++)
-    {
-        printf("%2i ", i);
+	for (unsigned int i = 0; i < m_apvMatched[nBigger]->size(); i++)
+    {
+        printf("%2d ", i);
     }
     printf("]\n");
@@ -254,10 +247,10 @@
         // for both objects - print out lines of matched elements
         printf("[ ");
-        for (i = 0; i < (int) m_apvMatched[ nObj ]->size(); i++)
+		for (unsigned int i = 0; i < m_apvMatched[nObj]->size(); i++)
         {
             if (IsMatched(nObj, i))
             {
                 // if the element is matched - print the index
-                printf("%2i ", GetMatchedIndex(nObj, i));
+                printf("%2d ", GetMatchedIndex(nObj, i));
             }
             else
Index: cpp/frams/model/similarity/simil_model.cpp
===================================================================
--- cpp/frams/model/similarity/simil_model.cpp	(revision 358)
+++ cpp/frams/model/similarity/simil_model.cpp	(revision 361)
@@ -734,5 +734,5 @@
                 {
                     GetNeighbIndexes(mod, partInd, nIndexes);
-                    for (int k = 0; k < (int) nIndexes.size(); k++)
+					for (unsigned int k = 0; k < nIndexes.size(); k++)
                     {
                         newDeg += m_fuzzyNeighb[mod][nIndexes.at(k)][depth - 1];
@@ -1722,9 +1722,12 @@
         // wartości orginalne transformacji dOrig uzyskuje się przez:
         // for ( iTrans = 0; iTrans <= TRANS_INDEX; iTrans++ ) dOrig *= dMul[ iTrans ];
+        //const char *szTransformNames[NO_OF_TRANSFORM] = { "ID", "S_yz", "S_xz", "S_xy", "R180_z", "R180_y", "R180_z", "S_(0,0,0)" };
         const int dMulX[ NO_OF_TRANSFORM ] = {1, -1, -1, 1, -1, 1, -1, -1};
         const int dMulY[ NO_OF_TRANSFORM ] = {1, 1, -1, -1, -1, -1, -1, 1};
         const int dMulZ[ NO_OF_TRANSFORM ] = {1, 1, 1, -1, -1, -1, 1, 1};
 
-#undef max
+#ifdef max
+ #undef max //this macro would conflict with line below
+#endif
         double dMinSimValue = std::numeric_limits<double>::max(); // minimum value of similarity
         int iMinSimTransform = -1; // index of the transformation with the minimum similarity
