Fix some warnings found by QNX's compiler
-Werror is now disabled for that compiler, but it doesn't hurt to fix. io/qstandardpaths_unix.cpp:149:32: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] qtestcase.cpp:2330:31: error: narrowing conversion of '(ms / 1000)' from 'int' to '_Timet {aka unsigned int}' inside { } [-Werror=narrowing] Change-Id: Id92f4a61915b49ddaee6fffd14aea2c1e686e8f2 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
This commit is contained in:
parent
e26bcc4d5d
commit
e19fda916a
@ -117,7 +117,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
|
||||
}
|
||||
case RuntimeLocation:
|
||||
{
|
||||
const uid_t myUid = geteuid();
|
||||
const uint myUid = uint(geteuid());
|
||||
// http://standards.freedesktop.org/basedir-spec/latest/
|
||||
QFileInfo fileInfo;
|
||||
QString xdgRuntimeDir = QFile::decodeName(qgetenv("XDG_RUNTIME_DIR"));
|
||||
|
@ -2246,7 +2246,7 @@ void QTest::qSleep(int ms)
|
||||
#elif defined(Q_OS_WIN)
|
||||
Sleep(uint(ms));
|
||||
#else
|
||||
struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
|
||||
struct timespec ts = { time_t(ms / 1000), (ms % 1000) * 1000 * 1000 };
|
||||
nanosleep(&ts, NULL);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user