summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2017-12-21 17:46:45 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2017-12-29 13:57:18 +0000
commit48ea14080ea0be33faa8a4390a89d501c807538a (patch)
tree6ab1a47ae3cc4c8d676b76677e54ca143ec98173 /src/network
parentdcc605beb6d82ef89d1088eb8b1bd25f2f1f3bd6 (diff)
QNetworkInterface: fix warning of unused function
That causes compilation error in developer build or when '-Werror' command line argument is forced: kernel/qnetworkinterface_unix.cpp:142:12: error: 'int getMtu(int, ifreq*)' defined but not used [-Werror=unused-function] static int getMtu(int socket, struct ifreq *req) ^ cc1plus: all warnings being treated as errors So, mark 'getMtu()' as unused in the appropriate branches. Change-Id: Ib4d74845835962bb12f56baf8e13834c032a0404 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp
index 30bb37319b..d69fc47667 100644
--- a/src/network/kernel/qnetworkinterface_unix.cpp
+++ b/src/network/kernel/qnetworkinterface_unix.cpp
@@ -341,6 +341,7 @@ QT_END_INCLUDE_NAMESPACE
static QList<QNetworkInterfacePrivate *> createInterfaces(ifaddrs *rawList)
{
+ Q_UNUSED(getMtu)
QList<QNetworkInterfacePrivate *> interfaces;
QSet<QString> seenInterfaces;
QVarLengthArray<int, 16> seenIndexes; // faster than QSet<int>
@@ -564,6 +565,7 @@ static void getAddressExtraInfo(QNetworkAddressEntry *entry, struct sockaddr *sa
static QList<QNetworkInterfacePrivate *> createInterfaces(ifaddrs *rawList)
{
+ Q_UNUSED(getMtu)
QList<QNetworkInterfacePrivate *> interfaces;
// make sure there's one entry for each interface