From e19fda916aa92f8890199dc4b9d56884c55d0cd8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 23 Mar 2017 15:18:00 -0700 Subject: 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 --- src/testlib/qtestcase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testlib') diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index d0f4f76fe5..ac71954a55 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -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 } -- cgit v1.2.3