← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2654: silence some sign mismatch in comparison and potentially-ambiguous-else warnings

 

------------------------------------------------------------
revno: 2654
committer: cologic <ne5@xxxxxxxxxxx>
branch nick: dcplusplus
timestamp: Wed 2011-10-26 07:38:50 -0400
message:
  silence some sign mismatch in comparison and potentially-ambiguous-else warnings
modified:
  dcpp/GeoIP.cpp
  dwt/src/util/RegKey.cpp
  win32/WinUtil.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/GeoIP.cpp'
--- dcpp/GeoIP.cpp	2011-10-11 18:38:23 +0000
+++ dcpp/GeoIP.cpp	2011-10-26 11:38:50 +0000
@@ -90,7 +90,7 @@
 
 		auto size = GeoIP_num_countries();
 		cache.resize(size);
-		for(int id = 1; id < size; ++id) {
+		for(unsigned id = 1; id < size; ++id) {
 
 			ParamMap params;
 

=== modified file 'dwt/src/util/RegKey.cpp'
--- dwt/src/util/RegKey.cpp	2011-01-02 17:12:02 +0000
+++ dwt/src/util/RegKey.cpp	2011-10-26 11:38:50 +0000
@@ -143,7 +143,7 @@
 	std::vector<tstring> v;
 	if(REGKEYINFO.cValues) {
 		TCHAR* tmp = (TCHAR*)malloc((REGKEYINFO.cchMaxValue + 1) * sizeof(TCHAR));
-		for(int i=0; i<REGKEYINFO.cValues; i++) {
+		for(unsigned int i=0; i<REGKEYINFO.cValues; i++) {
 			memset(tmp,0,(REGKEYINFO.cchMaxValue + 1) * sizeof(TCHAR));
 			cbName = 16383;
 			lResult = RegEnumValue(m_hKeyHandle, i,
@@ -177,7 +177,7 @@
 	if(REGKEYINFO.cSubKeys) {
 		TCHAR* tmp = (TCHAR*)malloc((REGKEYINFO.cbMaxSubKey + 1) * sizeof(TCHAR));
 		FILETIME ftLastWriteTime;
-		for(int i=0; i<REGKEYINFO.cSubKeys; i++) {
+		for(unsigned int i=0; i<REGKEYINFO.cSubKeys; i++) {
 			memset(tmp,0,(REGKEYINFO.cbMaxSubKey + 1) * sizeof(TCHAR));
 			cbName = 255;
 			lResult = RegEnumKeyEx(m_hKeyHandle, i,

=== modified file 'win32/WinUtil.cpp'
--- win32/WinUtil.cpp	2011-10-15 22:58:51 +0000
+++ win32/WinUtil.cpp	2011-10-26 11:38:50 +0000
@@ -346,10 +346,11 @@
 	dwt::LibraryLoader kernel(_T("kernel32.dll"));
 	typedef BOOL (WINAPI *SPDP)(DWORD);
 	SPDP spdp = (SPDP)kernel.getProcAddress(_T("SetProcessDEPPolicy"));
-	if (spdp)
+	if (spdp) {
 		dcdebug("SetProcessDEPPolicy %s\n", (*spdp)(1)?"succeeded":"failed");
-	else
-		dcdebug("SetProcessDEPPolicy not present\n");	
+	} else {
+		dcdebug("SetProcessDEPPolicy not present\n");
+	}
 }
 
 tstring WinUtil::encodeFont(LOGFONT const& font) {