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/LinkLocal/DNSSD
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/LinkLocal/DNSSD')
-rw-r--r--Swiften/LinkLocal/DNSSD/Bonjour/BonjourBrowseQuery.h5
-rw-r--r--Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h5
-rw-r--r--Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveServiceQuery.h4
3 files changed, 8 insertions, 6 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourBrowseQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourBrowseQuery.h
index 6e79290..52d6654 100644
--- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourBrowseQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourBrowseQuery.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -9,6 +9,7 @@
#include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h>
#include <Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h>
#include <Swiften/EventLoop/EventLoop.h>
+#include <boost/numeric/conversion/cast.hpp>
namespace Swift {
class BonjourQuerier;
@@ -48,7 +49,7 @@ namespace Swift {
}
else {
//std::cout << "Discovered service: name:" << name << " domain:" << domain << " type: " << type << std::endl;
- DNSSDServiceID service(name, domain, type, interfaceIndex);
+ DNSSDServiceID service(name, domain, type, boost::numeric_cast<int>(interfaceIndex));
if (flags & kDNSServiceFlagsAdd) {
eventLoop->postEvent(boost::bind(boost::ref(onServiceAdded), service), shared_from_this());
}
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
index 9fdd3d5..59d1af5 100644
--- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -13,6 +13,7 @@
#include <Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h>
#include <Swiften/EventLoop/EventLoop.h>
#include <Swiften/Network/HostAddress.h>
+#include <boost/numeric/conversion/cast.hpp>
#include <netinet/in.h>
@@ -23,7 +24,7 @@ namespace Swift {
public:
BonjourResolveHostnameQuery(const std::string& hostname, int interfaceIndex, boost::shared_ptr<BonjourQuerier> querier, EventLoop* eventLoop) : BonjourQuery(querier, eventLoop) {
DNSServiceErrorType result = DNSServiceGetAddrInfo(
- &sdRef, 0, interfaceIndex, kDNSServiceProtocol_IPv4,
+ &sdRef, 0, boost::numeric_cast<unsigned int>(interfaceIndex), kDNSServiceProtocol_IPv4,
hostname.c_str(),
&BonjourResolveHostnameQuery::handleHostnameResolvedStatic, this);
if (result != kDNSServiceErr_NoError) {
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveServiceQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveServiceQuery.h
index 1fb050c..2eeac64 100644
--- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveServiceQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveServiceQuery.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -19,7 +19,7 @@ namespace Swift {
public:
BonjourResolveServiceQuery(const DNSSDServiceID& service, boost::shared_ptr<BonjourQuerier> querier, EventLoop* eventLoop) : BonjourQuery(querier, eventLoop) {
DNSServiceErrorType result = DNSServiceResolve(
- &sdRef, 0, service.getNetworkInterfaceID(),
+ &sdRef, 0, boost::numeric_cast<unsigned int>(service.getNetworkInterfaceID()),
service.getName().c_str(), service.getType().c_str(),
service.getDomain().c_str(),
&BonjourResolveServiceQuery::handleServiceResolvedStatic, this);