From 68888eeaa8d84ed54ff8854110f488ad1c5054e9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 16 Jan 2009 17:41:25 +0000 Subject: [PATCH] compilation fixes for 64 bit platforms git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/net/socket.cpp | 6 +++--- tests/streams/bstream.h | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/net/socket.cpp b/tests/net/socket.cpp index c0eb7e8fe9..5928915e41 100644 --- a/tests/net/socket.cpp +++ b/tests/net/socket.cpp @@ -179,7 +179,7 @@ void SocketTestCase::ReadNormal() sock->Read(bufSmall, WXSIZEOF(bufSmall)); CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() ); - CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), sock->LastCount() ); + CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), (size_t)sock->LastCount() ); char bufBig[102400]; @@ -199,7 +199,7 @@ void SocketTestCase::ReadBlock() sock->Read(bufSmall, WXSIZEOF(bufSmall)); CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() ); - CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), sock->LastCount() ); + CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), (size_t)sock->LastCount() ); char bufBig[102400]; @@ -235,7 +235,7 @@ void SocketTestCase::ReadWaitall() sock->Read(buf, WXSIZEOF(buf)); CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() ); - CPPUNIT_ASSERT_EQUAL( WXSIZEOF(buf), sock->LastCount() ); + CPPUNIT_ASSERT_EQUAL( WXSIZEOF(buf), (size_t)sock->LastCount() ); } void SocketTestCase::UrlTest() diff --git a/tests/streams/bstream.h b/tests/streams/bstream.h index 36394c56f3..7304133977 100644 --- a/tests/streams/bstream.h +++ b/tests/streams/bstream.h @@ -28,8 +28,11 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( Name, COMPOSE_TEST_NAME(Name) ); \ STREAM_IMPLEMENT_SUB_REGISTRATION_ROUTINE( Name ) - +// under 64 bit platforms wxFileOffset is the same as long and we already have +// WX_CPPUNIT_ALLOW_EQUALS_TO_INT(long) in wx/cppunit.h +#if SIZEOF_LONG != 8 WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxFileOffset) +#endif /////////////////////////////////////////////////////////////////////////////// // Template class that implements a test for all base stream functions.