From ce97f37bffca141597ad326d5964dd49abb43a0b Mon Sep 17 00:00:00 2001 From: Marko Kangas Date: Fri, 13 Feb 2015 12:48:32 +0200 Subject: Fix tst_largefile QCOMPARE value types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added casting to QT_OFF_T type. Otherwise fails on some compilers. Change-Id: I4f1f0c558af7d182a4babf38a7f048b27b3db611 Reviewed-by: Pasi Petäjäjärvi Reviewed-by: Thiago Macieira --- tests/auto/corelib/io/largefile/tst_largefile.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/auto/corelib/io') diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp index c1c4b5ea46..0a28ee7b9c 100644 --- a/tests/auto/corelib/io/largefile/tst_largefile.cpp +++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp @@ -407,11 +407,11 @@ void tst_LargeFile::fdPositioning() file.close(); - QCOMPARE( QT_LSEEK(fd_, QT_OFF_T(0), SEEK_SET), QT_OFF_T(0) ); - QCOMPARE( QT_LSEEK(fd_, QT_OFF_T(position), SEEK_SET), QT_OFF_T(position) ); + QCOMPARE( QT_OFF_T(QT_LSEEK(fd_, QT_OFF_T(0), SEEK_SET)), QT_OFF_T(0) ); + QCOMPARE( QT_OFF_T(QT_LSEEK(fd_, QT_OFF_T(position), SEEK_SET)), QT_OFF_T(position) ); QVERIFY( file.open(fd_, QIODevice::ReadOnly) ); - QCOMPARE( QT_LSEEK(fd_, QT_OFF_T(0), SEEK_CUR), QT_OFF_T(position) ); + QCOMPARE( QT_OFF_T(QT_LSEEK(fd_, QT_OFF_T(0), SEEK_CUR)), QT_OFF_T(position) ); QCOMPARE( file.pos(), position ); QVERIFY( file.seek(0) ); QCOMPARE( file.pos(), (qint64)0 ); @@ -438,12 +438,12 @@ void tst_LargeFile::streamPositioning() file.close(); QVERIFY( !QT_FSEEK(stream_, QT_OFF_T(0), SEEK_SET) ); - QCOMPARE( QT_FTELL(stream_), QT_OFF_T(0) ); + QCOMPARE( QT_OFF_T(QT_FTELL(stream_)), QT_OFF_T(0) ); QVERIFY( !QT_FSEEK(stream_, QT_OFF_T(position), SEEK_SET) ); - QCOMPARE( QT_FTELL(stream_), QT_OFF_T(position) ); + QCOMPARE( QT_OFF_T(QT_FTELL(stream_)), QT_OFF_T(position) ); QVERIFY( file.open(stream_, QIODevice::ReadOnly) ); - QCOMPARE( QT_FTELL(stream_), QT_OFF_T(position) ); + QCOMPARE( QT_OFF_T(QT_FTELL(stream_)), QT_OFF_T(position) ); QCOMPARE( file.pos(), position ); QVERIFY( file.seek(0) ); QCOMPARE( file.pos(), (qint64)0 ); -- cgit v1.2.3