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>
bb10
parent
dcc605beb6
commit
48ea14080e
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue