summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-09-06 09:52:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-09 07:27:15 +0200
commit417269a69b108c4e322d73912e852c9e50a6f61a (patch)
tree39c92746d0c40ddc7d5f7a2e48468c7cc3105587
parentc5dd2fb2c4a31a0661bb71dceb233fa5f7f3ce36 (diff)
Fix unsigned/signed comparison warning in qnativesocketengine_unix
This triggered when building on Android. Make sure we cast the sizeof() to the same type as the variable we compare to. Change-Id: I65d4fe7edc2a39f1a4b68e78f4c19bff6e4aa0f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 4c94c4dbb9..e076f2b4bf 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -741,7 +741,7 @@ QNetworkInterface QNativeSocketEnginePrivate::nativeMulticastInterface() const
QT_SOCKOPTLEN_T sizeofv = sizeof(v);
if (::getsockopt(socketDescriptor, IPPROTO_IP, IP_MULTICAST_IF, &v, &sizeofv) == -1)
return QNetworkInterface();
- if (v.s_addr != 0 && sizeofv >= sizeof(v)) {
+ if (v.s_addr != 0 && sizeofv >= QT_SOCKOPTLEN_T(sizeof(v))) {
QHostAddress ipv4(ntohl(v.s_addr));
QList<QNetworkInterface> ifaces = QNetworkInterface::allInterfaces();
for (int i = 0; i < ifaces.count(); ++i) {