Index: source/keyimpl.cxx
===================================================================
RCS file: /cvs/udk/registry/source/keyimpl.cxx,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- source/keyimpl.cxx	19 Jun 2006 14:26:48 -0000	1.6
+++ source/keyimpl.cxx	30 Jun 2006 12:32:58 -0000	1.6.2.1
@@ -1102,8 +1102,8 @@
         }
     }
 
-    if (_ret = pKey->setValue(OUString( RTL_CONSTASCII_USTRINGPARAM("LINK_TARGET") ), 
-							  RG_VALUETYPE_UNICODE, (RegValue)linkTarget.getStr(), (linkTarget.getLength()+1)*2))
+    if ((_ret = pKey->setValue(OUString( RTL_CONSTASCII_USTRINGPARAM("LINK_TARGET") ), 
+							  RG_VALUETYPE_UNICODE, (RegValue)linkTarget.getStr(), (linkTarget.getLength()+1)*2)))
     {
         m_pRegistry->closeKey(pKey);
         _ret = m_pRegistry->deleteKey(this, linkName);
Index: source/regimpl.cxx
===================================================================
RCS file: /cvs/udk/registry/source/regimpl.cxx,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -r1.21 -r1.21.2.1
--- source/regimpl.cxx	19 Jun 2006 14:27:52 -0000	1.21
+++ source/regimpl.cxx	30 Jun 2006 12:32:58 -0000	1.21.2.1
@@ -1825,12 +1825,14 @@
         case 1:
             {
                 fprintf(stdout, "%sValue: Type = RG_VALUETYPE_LONG\n", indent);
-                fprintf(stdout, "%s       Size = %d\n", indent, valueSize);
+                fprintf(
+                    stdout, "%s       Size = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(valueSize));
                 fprintf(stdout, "%s       Data = ", indent);
 
                 sal_Int32 value;
                 readINT32(pBuffer, value);
-                fprintf(stdout, "%d\n", value);
+                fprintf(stdout, "%ld\n", sal::static_int_cast< long >(value));
             }
             break;
         case 2:
@@ -1845,7 +1847,9 @@
                 } else
                 {
                     fprintf(stdout, "%sValue: Type = RG_VALUETYPE_STRING\n", indent);
-                    fprintf(stdout, "%s       Size = %d\n", indent, valueSize);
+                    fprintf(
+                        stdout, "%s       Size = %lu\n", indent,
+                        sal::static_int_cast< unsigned long >(valueSize));
                     fprintf(stdout, "%s       Data = \"%s\"\n", indent, value);
                 }
 
@@ -1856,7 +1860,9 @@
             {
                 sal_uInt32 size = (valueSize / 2) * sizeof(sal_Unicode);
                 fprintf(stdout, "%sValue: Type = RG_VALUETYPE_UNICODE\n", indent);
-                fprintf(stdout, "%s       Size = %d\n", indent, valueSize);
+                fprintf(
+                    stdout, "%s       Size = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(valueSize));
                 fprintf(stdout, "%s       Data = ", indent);
 
                 sal_Unicode* value = new sal_Unicode[size];
@@ -1870,7 +1876,9 @@
         case 4:
             {
                 fprintf(stdout, "%sValue: Type = RG_VALUETYPE_BINARY\n", indent);
-                fprintf(stdout, "%s       Size = %d\n", indent, valueSize);
+                fprintf(
+                    stdout, "%s       Size = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(valueSize));
                 fprintf(stdout, "%s       Data = ", indent);
                 dumpType(
                     typereg::Reader(
@@ -1886,8 +1894,12 @@
                 readUINT32(pBuffer, len);
 
                 fprintf(stdout, "%sValue: Type = RG_VALUETYPE_LONGLIST\n", indent);
-                fprintf(stdout, "%s       Size = %d\n", indent, valueSize);
-                fprintf(stdout, "%s       Len  = %d\n", indent, len);
+                fprintf(
+                    stdout, "%s       Size = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(valueSize));
+                fprintf(
+                    stdout, "%s       Len  = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(len));
                 fprintf(stdout, "%s       Data = ", indent);
 
                 sal_Int32 longValue;
@@ -1898,7 +1910,10 @@
                     if (offset > 4)
                         fprintf(stdout, "%s              ", indent);
 
-                    fprintf(stdout, "%d = %d\n", i, longValue);
+                    fprintf(
+                        stdout, "%lu = %ld\n",
+                        sal::static_int_cast< unsigned long >(i),
+                        sal::static_int_cast< long >(longValue));
                     offset += 4; // 4 Bytes fuer sal_Int32
                 }
             }
@@ -1912,8 +1927,12 @@
                 readUINT32(pBuffer, len);
 
                 fprintf(stdout, "%sValue: Type = RG_VALUETYPE_STRINGLIST\n", indent);
-                fprintf(stdout, "%s       Size = %d\n", indent, valueSize);
-                fprintf(stdout, "%s       Len  = %d\n", indent, len);
+                fprintf(
+                    stdout, "%s       Size = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(valueSize));
+                fprintf(
+                    stdout, "%s       Len  = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(len));
                 fprintf(stdout, "%s       Data = ", indent);
 
                 sal_Char *pValue;
@@ -1929,7 +1948,9 @@
                     if (offset > 8)
                         fprintf(stdout, "%s              ", indent);
 
-                    fprintf(stdout, "%d = \"%s\"\n", i, pValue);
+                    fprintf(
+                        stdout, "%lu = \"%s\"\n",
+                        sal::static_int_cast< unsigned long >(i), pValue);
                     offset += sLen;
                 }
             }
@@ -1943,8 +1964,12 @@
                 readUINT32(pBuffer, len);
 
                 fprintf(stdout, "%sValue: Type = RG_VALUETYPE_UNICODELIST\n", indent);
-                fprintf(stdout, "%s       Size = %d\n", indent, valueSize);
-                fprintf(stdout, "%s       Len  = %d\n", indent, len);
+                fprintf(
+                    stdout, "%s       Size = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(valueSize));
+                fprintf(
+                    stdout, "%s       Len  = %lu\n", indent,
+                    sal::static_int_cast< unsigned long >(len));
                 fprintf(stdout, "%s       Data = ", indent);
 
                 sal_Unicode *pValue;
@@ -1962,7 +1987,10 @@
                         fprintf(stdout, "%s              ", indent);
 
                     uStr = OUStringToOString(pValue, RTL_TEXTENCODING_UTF8);
-                    fprintf(stdout, "%d = L\"%s\"\n", i, uStr.getStr());
+                    fprintf(
+                        stdout, "%lu = L\"%s\"\n",
+                        sal::static_int_cast< unsigned long >(i),
+                        uStr.getStr());
 
                     offset += sLen;
 
Index: source/registry.cxx
===================================================================
RCS file: /cvs/udk/registry/source/registry.cxx,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -r1.15 -r1.15.2.1
--- source/registry.cxx	19 Jun 2006 14:28:18 -0000	1.15
+++ source/registry.cxx	30 Jun 2006 12:32:58 -0000	1.15.2.1
@@ -203,7 +203,7 @@
 	RegError ret;
 
 	ORegistry* pReg = new ORegistry();
-	if (ret = pReg->initRegistry(registryName, REG_CREATE))
+	if ((ret = pReg->initRegistry(registryName, REG_CREATE)))
 	{
 		*phRegistry = NULL;
 		return ret;
@@ -249,7 +249,7 @@
 	RegError _ret;
 
 	ORegistry* pReg = new ORegistry();
-	if (_ret = pReg->initRegistry(registryName, accessMode))
+	if ((_ret = pReg->initRegistry(registryName, accessMode)))
 	{
 		*phRegistry = NULL;
 		delete pReg;
@@ -365,10 +365,10 @@
 		pKey->deleteKey(keyName);
 	}
 
-	if (_ret = pKey->createKey(keyName, (RegKeyHandle*)&pNewKey))
+	if ((_ret = pKey->createKey(keyName, (RegKeyHandle*)&pNewKey)))
 		return _ret;
 
-	if (_ret = pReg->loadKey(pNewKey, regFileName))
+	if ((_ret = pReg->loadKey(pNewKey, regFileName)))
 	{
 		pKey->closeKey(pNewKey);
 		pKey->deleteKey(keyName);
@@ -411,10 +411,10 @@
 		return REG_INVALID_KEY;
 	}
 
-	if (_ret = pKey->openKey(keyName, (RegKeyHandle*)&pNewKey))
+	if ((_ret = pKey->openKey(keyName, (RegKeyHandle*)&pNewKey)))
 		return _ret;
 
-	if (_ret = pReg->saveKey(pNewKey, regFileName))
+	if ((_ret = pReg->saveKey(pNewKey, regFileName)))
 	{
 		pKey->closeKey(pNewKey);
 		return _ret;
@@ -463,7 +463,7 @@
 
 	if (keyName->length)
 	{
-		if (_ret = pKey->createKey(keyName, (RegKeyHandle*)&pNewKey) )
+		if ((_ret = pKey->createKey(keyName, (RegKeyHandle*)&pNewKey) ))
 			return _ret;
 	} else
 	{
@@ -656,7 +656,7 @@
 	RegError ret;
 
 	ORegistry* pReg = new ORegistry();
-	if (ret = pReg->initRegistry(registryName, REG_CREATE))
+	if ((ret = pReg->initRegistry(registryName, REG_CREATE)))
 	{
 		*phRegistry = NULL;
 		return ret;
@@ -705,7 +705,7 @@
 	RegError _ret;
 
 	ORegistry* pReg = new ORegistry();
-	if (_ret = pReg->initRegistry(registryName, accessMode))
+	if ((_ret = pReg->initRegistry(registryName, accessMode)))
 	{
 		*phRegistry = NULL;
 		return _ret;
Index: tools/regcompare.cxx
===================================================================
RCS file: /cvs/udk/registry/tools/regcompare.cxx,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -r1.22 -r1.22.2.1
--- tools/regcompare.cxx	19 Jun 2006 14:29:14 -0000	1.22
+++ tools/regcompare.cxx	30 Jun 2006 12:32:59 -0000	1.22.2.1
@@ -592,10 +592,15 @@
 			fprintf(stdout, "%d", constValue.m_value.aUShort);
             break;
 		case RT_TYPE_INT32:
-			fprintf(stdout, "%d", constValue.m_value.aLong);
+			fprintf(
+                stdout, "%ld",
+                sal::static_int_cast< long >(constValue.m_value.aLong));
             break;
 		case RT_TYPE_UINT32:
-			fprintf(stdout, "%d", constValue.m_value.aULong);
+			fprintf(
+                stdout, "%lu",
+                sal::static_int_cast< unsigned long >(
+                    constValue.m_value.aULong));
             break;
 //		case RT_TYPE_INT64:
 //			fprintf(stdout, "%d", constValue.m_value.aHyper);
@@ -608,7 +613,11 @@
 			fprintf(stdout, "%f", constValue.m_value.aDouble);
             break;
 		case RT_TYPE_STRING:
-			fprintf(stdout, "%s", constValue.m_value.aString);
+			fprintf(
+                stdout, "%s",
+                (rtl::OUStringToOString(
+                    constValue.m_value.aString, RTL_TEXTENCODING_UTF8).
+                 getStr()));
             break;
         default:
             break;
@@ -701,8 +710,9 @@
 						fprintf(stdout, "%s: %s\n", getTypeClass(typeClass), U2S(keyName));
 						bDump = sal_False;
 					}
-                    fprintf(stdout, "  Field %d: Value1 = %d  !=  Value2 = %d\n", index1,
-                            constValue1.m_value.aLong, constValue2.m_value.aLong);
+                    fprintf(stdout, "  Field %d: Value1 = %ld  !=  Value2 = %ld\n", index1,
+                            sal::static_int_cast< long >(constValue1.m_value.aLong),
+                            sal::static_int_cast< long >(constValue2.m_value.aLong));
 				}
 				return 1;
 			}
@@ -717,8 +727,9 @@
 						fprintf(stdout, "%s: %s\n", getTypeClass(typeClass), U2S(keyName));
 						bDump = sal_False;
 					}
-                    fprintf(stdout, "  Field %d: Value1 = %d  !=  Value2 = %d\n", index1,
-                            constValue1.m_value.aULong, constValue2.m_value.aULong);
+                    fprintf(stdout, "  Field %d: Value1 = %lu  !=  Value2 = %lu\n", index1,
+                            sal::static_int_cast< unsigned long >(constValue1.m_value.aULong),
+                            sal::static_int_cast< unsigned long >(constValue2.m_value.aULong));
 				}
 				return 1;
 			}
@@ -785,7 +796,7 @@
 						fprintf(stdout, "%s: %s\n", getTypeClass(typeClass), U2S(keyName));
 						bDump = sal_False;
 					}
-                    fprintf(stdout, "  Field %d: Value1 = %d  !=  Value2 = %d\n", index1,
+                    fprintf(stdout, "  Field %d: Value1 = %f  !=  Value2 = %f\n", index1,
                             constValue1.m_value.aFloat, constValue2.m_value.aFloat);
 				}
 				return 1;
@@ -801,7 +812,7 @@
 						fprintf(stdout, "%s: %s\n", getTypeClass(typeClass), U2S(keyName));
 						bDump = sal_False;
 					}
-                    fprintf(stdout, "  Field %d: Value1 = %d  !=  Value2 = %d\n", index1,
+                    fprintf(stdout, "  Field %d: Value1 = %f  !=  Value2 = %f\n", index1,
                             constValue1.m_value.aDouble, constValue2.m_value.aDouble);
 				}
 				return 1;
@@ -1348,7 +1359,10 @@
 	{
 		if ( options.forceOutput() )
 		{
-			fprintf(stdout, "    Size1 = %d    Size2 = %d\n", size1, size2);
+			fprintf(
+                stdout, "    Size1 = %lu    Size2 = %lu\n",
+                sal::static_int_cast< unsigned long >(size1),
+                sal::static_int_cast< unsigned long >(size2));
 		}
 	}
     if (reader1.isPublished()) {
@@ -1802,19 +1816,25 @@
 			{
 			case RG_VALUETYPE_LONG:
 				fprintf(stdout, "    Registry 1: Value: Type = RG_VALUETYPE_LONG\n");
-				fprintf(stdout, "                       Size = %d\n", size1);
+				fprintf(
+                    stdout, "                       Size = %lu\n",
+                    sal::static_int_cast< unsigned long >(size1));
 				fprintf(stdout, "                       Data = %p\n", value1);
 				break;
 			case RG_VALUETYPE_STRING:
 				fprintf(stdout, "    Registry 1: Value: Type = RG_VALUETYPE_STRING\n");
-				fprintf(stdout, "                       Size = %d\n", size1);
+				fprintf(
+                    stdout, "                       Size = %lu\n",
+                    sal::static_int_cast< unsigned long >(size1));
 				fprintf(stdout, "                       Data = \"%s\"\n", (sal_Char*)value1);
 				break;
 			case RG_VALUETYPE_UNICODE:
 				{
 				OUString uStrValue((sal_Unicode*)value1);
 				fprintf(stdout, "    Registry 1: Value: Type = RG_VALUETYPE_UNICODE\n");
-				fprintf(stdout, "                       Size = %d\n", size1);
+				fprintf(
+                    stdout, "                       Size = %lu\n",
+                    sal::static_int_cast< unsigned long >(size1));
 				fprintf(stdout, "                       Data = \"%s\"\n", U2S(uStrValue));
 				}
 				break;
@@ -1834,11 +1854,16 @@
 			RegistryValueList<sal_Int32> valueList;
 			key1.getLongListValue(tmpName, valueList);
 			fprintf(stdout, "    Registry 1: Value: Type = RG_VALUETYPE_LONGLIST\n");
-			fprintf(stdout, "                       Size = %d\n", size1);
+			fprintf(
+                stdout, "                       Size = %lu\n",
+                sal::static_int_cast< unsigned long >(size1));
 			sal_uInt32 length = valueList.getLength();
 			for (sal_uInt32 i=0; i<length; i++)
 			{
-				fprintf(stdout, "                       Data[%d] = %d\n", i, valueList.getElement(i));		
+				fprintf(
+                    stdout, "                       Data[%lu] = %ld\n",
+                    sal::static_int_cast< unsigned long >(i),
+                    sal::static_int_cast< long >(valueList.getElement(i)));
 			}
 			}
 			break;
@@ -1847,11 +1872,16 @@
 			RegistryValueList<sal_Char*> valueList;
 			key1.getStringListValue(tmpName, valueList);
 			fprintf(stdout, "    Registry 1: Value: Type = RG_VALUETYPE_STRINGLIST\n");
-			fprintf(stdout, "                       Size = %d\n", size1);
+			fprintf(
+                stdout, "                       Size = %lu\n",
+                sal::static_int_cast< unsigned long >(size1));
 			sal_uInt32 length = valueList.getLength();
 			for (sal_uInt32 i=0; i<length; i++)
 			{
-				fprintf(stdout, "                       Data[%d] = \"%s\"\n", i, valueList.getElement(i));		
+				fprintf(
+                    stdout, "                       Data[%lu] = \"%s\"\n",
+                    sal::static_int_cast< unsigned long >(i),
+                    valueList.getElement(i));		
 			}
 			}
 			break;
@@ -1860,13 +1890,17 @@
 			RegistryValueList<sal_Unicode*> valueList;
 			key1.getUnicodeListValue(tmpName, valueList);
 			fprintf(stdout, "    Registry 1: Value: Type = RG_VALUETYPE_UNICODELIST\n");
-			fprintf(stdout, "                       Size = %d\n", size1);
+			fprintf(
+                stdout, "                       Size = %lu\n",
+                sal::static_int_cast< unsigned long >(size1));
 			sal_uInt32 length = valueList.getLength();
 			OUString uStrValue;
 			for (sal_uInt32 i=0; i<length; i++)
 			{
 				uStrValue = OUString(valueList.getElement(i));
-				fprintf(stdout, "                       Data[%d] = \"%s\"\n", i, U2S(uStrValue));
+				fprintf(
+                    stdout, "                       Data[%lu] = \"%s\"\n",
+                    sal::static_int_cast< unsigned long >(i), U2S(uStrValue));
 			}
 			}
 			break;
@@ -1888,19 +1922,25 @@
 			{
 			case RG_VALUETYPE_LONG:
 				fprintf(stdout, "    Registry 2: Value: Type = RG_VALUETYPE_LONG\n");
-				fprintf(stdout, "                       Size = %d\n", size2);
+				fprintf(
+                    stdout, "                       Size = %lu\n",
+                    sal::static_int_cast< unsigned long >(size2));
 				fprintf(stdout, "                       Data = %p\n", value2);
 				break;
 			case RG_VALUETYPE_STRING:
 				fprintf(stdout, "    Registry 2: Value: Type = RG_VALUETYPE_STRING\n");
-				fprintf(stdout, "                       Size = %d\n", size2);
+				fprintf(
+                    stdout, "                       Size = %lu\n",
+                    sal::static_int_cast< unsigned long >(size2));
 				fprintf(stdout, "                       Data = \"%s\"\n", (sal_Char*)value2);
 				break;
 			case RG_VALUETYPE_UNICODE:
 				{
 				OUString uStrValue((sal_Unicode*)value2);
 				fprintf(stdout, "    Registry 2: Value: Type = RG_VALUETYPE_UNICODE\n");
-				fprintf(stdout, "                       Size = %d\n", size2);
+				fprintf(
+                    stdout, "                       Size = %lu\n",
+                    sal::static_int_cast< unsigned long >(size2));
 				fprintf(stdout, "                       Data = \"%s\"\n", U2S(uStrValue));
 				}
 				break;
@@ -1920,11 +1960,16 @@
 			RegistryValueList<sal_Int32> valueList;
 			key2.getLongListValue(tmpName, valueList);
 			fprintf(stdout, "    Registry 2: Value: Type = RG_VALUETYPE_LONGLIST\n");
-			fprintf(stdout, "                       Size = %d\n", size2);
+			fprintf(
+                stdout, "                       Size = %lu\n",
+                sal::static_int_cast< unsigned long >(size2));
 			sal_uInt32 length = valueList.getLength();
 			for (sal_uInt32 i=0; i<length; i++)
 			{
-				fprintf(stdout, "                       Data[%d] = %d\n", i, valueList.getElement(i));		
+				fprintf(
+                    stdout, "                       Data[%lu] = %ld\n",
+                    sal::static_int_cast< unsigned long >(i),
+                    sal::static_int_cast< long >(valueList.getElement(i)));
 			}
 			}
 			break;
@@ -1933,11 +1978,16 @@
 			RegistryValueList<sal_Char*> valueList;
 			key2.getStringListValue(tmpName, valueList);
 			fprintf(stdout, "    Registry 2: Value: Type = RG_VALUETYPE_STRINGLIST\n");
-			fprintf(stdout, "                       Size = %d\n", size2);
+			fprintf(
+                stdout, "                       Size = %lu\n",
+                sal::static_int_cast< unsigned long >(size2));
 			sal_uInt32 length = valueList.getLength();
 			for (sal_uInt32 i=0; i<length; i++)
 			{
-				fprintf(stdout, "                       Data[%d] = \"%s\"\n", i, valueList.getElement(i));		
+				fprintf(
+                    stdout, "                       Data[%lu] = \"%s\"\n",
+                    sal::static_int_cast< unsigned long >(i),
+                    valueList.getElement(i));		
 			}
 			}
 			break;
@@ -1946,13 +1996,17 @@
 			RegistryValueList<sal_Unicode*> valueList;
 			key2.getUnicodeListValue(tmpName, valueList);
 			fprintf(stdout, "    Registry 2: Value: Type = RG_VALUETYPE_UNICODELIST\n");
-			fprintf(stdout, "                       Size = %d\n", size2);
+			fprintf(
+                stdout, "                       Size = %lu\n",
+                sal::static_int_cast< unsigned long >(size2));
 			sal_uInt32 length = valueList.getLength();
 			OUString uStrValue;
 			for (sal_uInt32 i=0; i<length; i++)
 			{
 				uStrValue = OUString(valueList.getElement(i));
-				fprintf(stdout, "                       Data[%d] = \"%s\"\n", i, U2S(uStrValue));
+				fprintf(
+                    stdout, "                       Data[%lu] = \"%s\"\n",
+                    sal::static_int_cast< unsigned long >(i), U2S(uStrValue));
 			}
 			}
 			break;
@@ -2325,12 +2379,14 @@
 	{
 		if ( options.unoTypeCheck() )
 		{
-			fprintf(stdout, "%s: registries are incompatible: %d differences!\n", 
-					options.getProgramName().getStr(), nError);
+			fprintf(stdout, "%s: registries are incompatible: %lu differences!\n", 
+					options.getProgramName().getStr(),
+                    sal::static_int_cast< unsigned long >(nError));
 		} else
 		{
-			fprintf(stdout, "%s: registries contain %d differences!\n", 
-					options.getProgramName().getStr(), nError);
+			fprintf(stdout, "%s: registries contain %lu differences!\n", 
+					options.getProgramName().getStr(),
+                    sal::static_int_cast< unsigned long >(nError));
 		}
 	} else
 	{
