summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfile/tst_qfile.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-29 12:38:51 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-29 17:08:46 +0000
commit1e303601a7355fb8282f0fcc3a8c4e86de944448 (patch)
tree973c22f9efa64bcc04be12443a4a25c3d2a2272d /tests/auto/corelib/io/qfile/tst_qfile.cpp
parent6aa2d49d5f98d8e23a32555a45c58dc4c7c4bb69 (diff)
Fix warnings in tests (MinGW/MSCV)
tst_qtcpsocket.cpp:606:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tst_qtcpsocket.cpp:670:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tst_qfile.cpp(2661): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) tst_qarraydata.cpp(760): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) main.cpp:40:33: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result] Change-Id: I80ccef29b71af6a2c3d45a79aedaeb37f49bba72 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qfile/tst_qfile.cpp')
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 287b8aebd8..2ef4c2c6a1 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -2618,9 +2618,10 @@ void tst_QFile::appendAndRead()
// Write blocks and read them back
for (int j = 0; j < 18; ++j) {
- writeFile.write(QByteArray(1 << j, '@'));
+ const int size = 1 << j;
+ writeFile.write(QByteArray(size, '@'));
writeFile.flush();
- QCOMPARE(readFile.read(1 << j).size(), 1 << j);
+ QCOMPARE(readFile.read(size).size(), size);
}
readFile.close();