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>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2013-09-06 09:52:54 +02:00 committed by The Qt Project
parent c5dd2fb2c4
commit 417269a69b

View File

@ -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) {