summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-03-23 15:18:00 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-03-25 04:51:01 +0000
commite19fda916aa92f8890199dc4b9d56884c55d0cd8 (patch)
treeff323ef510029e35f5e160e8407fb3fcde24025f /src
parente26bcc4d5d879ffa9f0fa8cce0fa1ffbbaf47e59 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qstandardpaths_unix.cpp2
-rw-r--r--src/testlib/qtestcase.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp
index 7974dc8cca..f0ff46fe7f 100644
--- a/src/corelib/io/qstandardpaths_unix.cpp
+++ b/src/corelib/io/qstandardpaths_unix.cpp
@@ -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"));
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
}