From: <man...@us...> - 2013-05-26 14:15:00
|
Revision: 2193 http://sourceforge.net/p/modplug/code/2193 Author: manxorist Date: 2013-05-26 14:14:54 +0000 (Sun, 26 May 2013) Log Message: ----------- [Fix] Make testsuite compile with GCC. Modified Paths: -------------- trunk/OpenMPT/openmpt123/Makefile trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/openmpt123/Makefile =================================================================== --- trunk/OpenMPT/openmpt123/Makefile 2013-05-26 14:01:19 UTC (rev 2192) +++ trunk/OpenMPT/openmpt123/Makefile 2013-05-26 14:14:54 UTC (rev 2193) @@ -45,6 +45,7 @@ LIBOPENMPT_SOURCES += \ $(SOUNDLIB_SOURCES) \ + $(wildcard ../test/*.cpp) \ ../libopenmpt/libopenmpt.cpp \ ../libopenmpt/libopenmpt_c.cpp \ ../libopenmpt/libopenmpt_cxx.cpp \ Modified: trunk/OpenMPT/test/test.cpp =================================================================== --- trunk/OpenMPT/test/test.cpp 2013-05-26 14:01:19 UTC (rev 2192) +++ trunk/OpenMPT/test/test.cpp 2013-05-26 14:14:54 UTC (rev 2193) @@ -40,6 +40,7 @@ #include <istream> #include <ostream> #include <sstream> +#include <stdexcept> #ifdef _DEBUG #if MPT_COMPILER_MSVC && defined(_MFC_VER) @@ -1139,7 +1140,7 @@ return pSndFile; } -static void DestroySoundFileContainer(TSoundFileContainer &sndFile) +static void DestroySoundFileContainer(TSoundFileContainer & /* sndFile */ ) { return; } @@ -1378,13 +1379,13 @@ char dst2[3]; // Destination buffer, smaller than source buffer #define ReadTest(mode, dst, src, expectedResult) \ - mpt::String::Read<mpt::String::##mode>(dst, src); \ + mpt::String::Read<mpt::String:: mode >(dst, src); \ VERIFY_EQUAL_NONCONT(strncmp(dst, expectedResult, CountOf(dst)), 0); /* Ensure that the strings are identical */ \ for(size_t i = strlen(dst); i < CountOf(dst); i++) \ VERIFY_EQUAL_NONCONT(dst[i], '\0'); /* Ensure that rest of the buffer is completely nulled */ #define WriteTest(mode, dst, src, expectedResult) \ - mpt::String::Write<mpt::String::##mode>(dst, src); \ + mpt::String::Write<mpt::String:: mode >(dst, src); \ VERIFY_EQUAL_NONCONT(strncmp(dst, expectedResult, CountOf(dst)), 0); /* Ensure that the strings are identical */ \ for(size_t i = strlen(dst); i < CountOf(dst); i++) \ VERIFY_EQUAL_NONCONT(dst[i], '\0'); /* Ensure that rest of the buffer is completely nulled */ @@ -1657,7 +1658,7 @@ } delete[] sourceBuf; - delete[] targetBuf; + delete[] static_cast<uint8*>(targetBuf); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |