QSysInfo: fix warning on non-Linux about unconditional adjacent returns
E.g. as seen on Integrity: "global/qglobal.cpp", line 2967: warning #111-D: statement is unreachable Change-Id: I6845192ee7fb14b66700b68118355c871b1a4baf Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
b149f5d77a
commit
6bcfe04535
@ -2952,6 +2952,7 @@ QString QSysInfo::machineHostName()
|
|||||||
struct utsname u;
|
struct utsname u;
|
||||||
if (uname(&u) == 0)
|
if (uname(&u) == 0)
|
||||||
return QString::fromLocal8Bit(u.nodename);
|
return QString::fromLocal8Bit(u.nodename);
|
||||||
|
return QString();
|
||||||
#else
|
#else
|
||||||
# ifdef Q_OS_WIN
|
# ifdef Q_OS_WIN
|
||||||
// Important: QtNetwork depends on machineHostName() initializing ws2_32.dll
|
// Important: QtNetwork depends on machineHostName() initializing ws2_32.dll
|
||||||
@ -2964,7 +2965,6 @@ QString QSysInfo::machineHostName()
|
|||||||
hostName[sizeof(hostName) - 1] = '\0';
|
hostName[sizeof(hostName) - 1] = '\0';
|
||||||
return QString::fromLocal8Bit(hostName);
|
return QString::fromLocal8Bit(hostName);
|
||||||
#endif
|
#endif
|
||||||
return QString();
|
|
||||||
}
|
}
|
||||||
#endif // QT_BOOTSTRAPPED
|
#endif // QT_BOOTSTRAPPED
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user