summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfile
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-25 11:58:12 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-28 13:10:43 +0000
commit49cdf51ac97d12749e770d792124b7f06d5fd9ca (patch)
tree44f0977840d169044dc8488d5e4aaca1206867c3 /tests/auto/corelib/io/qfile
parent277208c169e94ebb8eb1a1c9bd46a844f50aa5f9 (diff)
Fix some warnings in tests
../tst_qfile.cpp: In member function 'void tst_QFile::handle()': ../tst_qfile.cpp:2661:38: warning: ignoring return value of 'ssize_t read(int, void*, size_t)', declared with attribute warn_unused_result [-Wunused-result] tst_qstatictext.cpp:862:58: warning: unused parameter 'textItem' [-Wunused-parameter] ../tst_qtcpsocket.cpp: In member function 'void tst_QTcpSocket::abortiveClose()': ../tst_qtcpsocket.cpp:2254:90: warning: suggest parentheses around assignment used as truth value [-Wparentheses] Test.cpp: In member function 'void My4Socket::read()': Test.cpp:66:20: warning: 'reply' may be used uninitialized in this function [-Wmaybe-uninitialized] ../tst_qlocalsocket.cpp: In lambda function: ../tst_qlocalsocket.cpp:701:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ../tst_qtcpserver.cpp: In member function 'void tst_QTcpServer::linkLocal()': ../tst_qtcpserver.cpp:935:92: warning: suggest parentheses around assignment used as truth value [-Wparentheses] ../tst_qtcpserver.cpp:940:92: warning: suggest parentheses around assignment used as truth value [-Wparentheses] Change-Id: Ic315069768bcb63a6b333c28ac65b0b992b0d43f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qfile')
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index eeba882c70..287b8aebd8 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -2658,7 +2658,8 @@ void tst_QFile::handle()
QVERIFY(fd > 2);
QCOMPARE(int(file.handle()), fd);
char c = '\0';
- QT_READ(int(file.handle()), &c, 1);
+ const auto readResult = QT_READ(int(file.handle()), &c, 1);
+ QCOMPARE(readResult, static_cast<decltype(readResult)>(1));
QCOMPARE(c, '/');
// test if the QFile and the handle remain in sync