summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-01-06 14:56:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-01-13 10:06:37 (GMT)
commit188fc285c6555eadd3c9d50ab8a94adcade78d89 (patch)
treef02f5e249f8b511300d55a826d3b727f9d8d844f /Swiften/Network/PlatformDomainNameServiceQuery.cpp
parentd5cab0388f6a40db6156a993e5f00acf9e63b577 (diff)
downloadswift-188fc285c6555eadd3c9d50ab8a94adcade78d89.zip
swift-188fc285c6555eadd3c9d50ab8a94adcade78d89.tar.bz2
Fix more warnings.
Fix sign conversion warnings. Removing heavy unnecessary includes. Change-Id: I992f43065498823098a875badb020c7c84fc4797
Diffstat (limited to 'Swiften/Network/PlatformDomainNameServiceQuery.cpp')
-rw-r--r--Swiften/Network/PlatformDomainNameServiceQuery.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
index b0579a7..5788d2f 100644
--- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp
+++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
@@ -12,6 +12,7 @@
#include <Swiften/Base/Platform.h>
#include <stdlib.h>
+#include <boost/numeric/conversion/cast.hpp>
#ifdef SWIFTEN_PLATFORM_WINDOWS
#undef UNICODE
#include <windows.h>
@@ -121,7 +122,7 @@ void PlatformDomainNameServiceQuery::runBlocking() {
emitError();
return;
}
- record.priority = ns_get16(currentEntry);
+ record.priority = boost::numeric_cast<int>(ns_get16(currentEntry));
currentEntry += 2;
// Weight
@@ -129,7 +130,7 @@ void PlatformDomainNameServiceQuery::runBlocking() {
emitError();
return;
}
- record.weight = ns_get16(currentEntry);
+ record.weight = boost::numeric_cast<int>(ns_get16(currentEntry));
currentEntry += 2;
// Port
@@ -137,7 +138,7 @@ void PlatformDomainNameServiceQuery::runBlocking() {
emitError();
return;
}
- record.port = ns_get16(currentEntry);
+ record.port = boost::numeric_cast<int>(ns_get16(currentEntry));
currentEntry += 2;
// Hostname