diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-25 08:41:00 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-25 08:41:00 (GMT) |
commit | 2d8716756ef648dcb34d7493d145360a0e029393 (patch) | |
tree | 5da1f346d36d5ae215d84889783e5cb2f076b1d3 /src/testlib/qtestfilelogger.cpp | |
parent | f2e4c961b3dc6b6e0713ffe75209ab5661e53dd6 (diff) | |
download | Qt-2d8716756ef648dcb34d7493d145360a0e029393.zip Qt-2d8716756ef648dcb34d7493d145360a0e029393.tar.gz Qt-2d8716756ef648dcb34d7493d145360a0e029393.tar.bz2 |
Fix warnings when compiling Qt (tst_warnings).
Don't use old-style casts in Qt code. And avoid signed/unsigned
comparisons (sizeof returns size_t, which is unsigned).
Diffstat (limited to 'src/testlib/qtestfilelogger.cpp')
-rw-r--r-- | src/testlib/qtestfilelogger.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testlib/qtestfilelogger.cpp b/src/testlib/qtestfilelogger.cpp index a717058..a64a452 100644 --- a/src/testlib/qtestfilelogger.cpp +++ b/src/testlib/qtestfilelogger.cpp @@ -73,10 +73,10 @@ void QTestFileLogger::init() QTestResult::currentTestObjectName()); // Keep filenames simple - for (int i = 0; i < sizeof(filename) && filename[i]; ++i) { + for (uint i = 0; i < sizeof(filename) && filename[i]; ++i) { char& c = filename[i]; - if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == '-' - || c == '.')) { + if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') + || (c >= '0' && c <= '9') || c == '-' || c == '.')) { c = '_'; } } |