diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-01-25 14:53:10 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-28 16:19:21 +0100 |
commit | ff31462e7378fe633cd346b48bb420c7fd2aaff0 (patch) | |
tree | 9e0589d7a61cc47eb93de09333625b0f4d185996 /tests | |
parent | 2b3ed64951dfa7fcb4e7a5d3add864e5220f6c0e (diff) |
Fix MinGW-Warnings in tst_qwinoverlappedionotifier.
Change-Id: I66c4e274c8b686d8a69476ad10751008f256e5a2
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp b/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp index 6e2eeced05..bad77b1e06 100644 --- a/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp +++ b/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp @@ -251,21 +251,24 @@ void tst_QWinOverlappedIoNotifier::multipleOperations() // start async read on client QByteArray clientReadBuffer(377, Qt::Uninitialized); - OVERLAPPED clientReadOverlapped = {0}; + OVERLAPPED clientReadOverlapped; + ZeroMemory(&clientReadOverlapped, sizeof(clientReadOverlapped)); BOOL readSuccess = ReadFile(hClient, clientReadBuffer.data(), clientReadBuffer.size(), NULL, &clientReadOverlapped); QVERIFY(readSuccess || GetLastError() == ERROR_IO_PENDING); // start async write client -> server QByteArray clientDataToWrite(233, 'B'); - OVERLAPPED clientWriteOverlapped = {0}; + OVERLAPPED clientWriteOverlapped; + ZeroMemory(&clientWriteOverlapped, sizeof(clientWriteOverlapped)); BOOL writeSuccess = WriteFile(hClient, clientDataToWrite.data(), clientDataToWrite.size(), NULL, &clientWriteOverlapped); QVERIFY(writeSuccess || GetLastError() == ERROR_IO_PENDING); // start async write server -> client QByteArray serverDataToWrite(144, 'A'); - OVERLAPPED serverOverlapped = {0}; + OVERLAPPED serverOverlapped; + ZeroMemory(&serverOverlapped, sizeof(serverOverlapped)); writeSuccess = WriteFile(hServer, serverDataToWrite.data(), serverDataToWrite.size(), NULL, &serverOverlapped); QVERIFY(writeSuccess || GetLastError() == ERROR_IO_PENDING); @@ -284,9 +287,9 @@ void tst_QWinOverlappedIoNotifier::multipleOperations() QTRY_COMPARE(sink.notifications.count(), 2); foreach (const NotifierSink::IOResult &r, sink.notifications) { QCOMPARE(r.errorCode, DWORD(ERROR_SUCCESS)); - if (r.bytes == serverDataToWrite.count()) + if (r.bytes == DWORD(serverDataToWrite.count())) QCOMPARE(r.overlapped, &clientReadOverlapped); - else if (r.bytes == clientDataToWrite.count()) + else if (r.bytes == DWORD(clientDataToWrite.count())) QCOMPARE(r.overlapped, &clientWriteOverlapped); else QVERIFY2(false, "Unexpected number of bytes received."); |