From: <man...@us...> - 2013-05-12 09:50:42
|
Revision: 2049 http://sourceforge.net/p/modplug/code/2049 Author: manxorist Date: 2013-05-12 09:50:36 +0000 (Sun, 12 May 2013) Log Message: ----------- Merged revision(s) 2041-2042 from branches/manx/gcc-fixes: [Ref] Fix gcc warnings in libopenmpt. ........ [Ref] Only use PaUtil_SetDebugPrintFunction() in MSVC builds in openmpt123. ........ Modified Paths: -------------- trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp trunk/OpenMPT/libopenmpt/libopenmpt_interactive.cpp trunk/OpenMPT/libopenmpt/libopenmpt_internal.h trunk/OpenMPT/libopenmpt/libopenmpt_stream_callbacks.h trunk/OpenMPT/libopenmpt/libopenmpt_version.cpp trunk/OpenMPT/openmpt123/openmpt123.cpp Property Changed: ---------------- trunk/OpenMPT/ Index: trunk/OpenMPT =================================================================== --- trunk/OpenMPT 2013-05-12 09:47:17 UTC (rev 2048) +++ trunk/OpenMPT 2013-05-12 09:50:36 UTC (rev 2049) Property changes on: trunk/OpenMPT ___________________________________________________________________ Modified: svn:mergeinfo ## -1,5 +1,5 ## /branches/manx/build-speedup:1586-1589 -/branches/manx/gcc-fixes:2022 +/branches/manx/gcc-fixes:2022,2041-2042 /branches/manx/header-dependencies-cleanups:1394-1397,1401-1402,1405-1406 /branches/manx/nonglobal-mixer:1715-1841 /branches/manx/profiler:1813 \ No newline at end of property Modified: trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2013-05-12 09:47:17 UTC (rev 2048) +++ trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2013-05-12 09:50:36 UTC (rev 2049) @@ -99,7 +99,7 @@ impl = new module_impl( data, std::make_shared<std_ostream_log>( log ) ); } -module::module( const char * beg, const char * end, std::ostream & log, const detail::api_version_checker & apicheck ) : impl(0) { +module::module( const char * beg, const char * end, std::ostream & log, const detail::api_version_checker & ) : impl(0) { impl = new module_impl( beg, end - beg, std::make_shared<std_ostream_log>( log ) ); } Modified: trunk/OpenMPT/libopenmpt/libopenmpt_interactive.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_interactive.cpp 2013-05-12 09:47:17 UTC (rev 2048) +++ trunk/OpenMPT/libopenmpt/libopenmpt_interactive.cpp 2013-05-12 09:50:36 UTC (rev 2049) @@ -98,7 +98,7 @@ delete interactive_impl; interactive_impl = nullptr; } -interactive_module::interactive_module( const interactive_module & ) { +interactive_module::interactive_module( const interactive_module & other ) : module(other) { throw std::runtime_error("openmpt::interactive_module is non-copyable"); } void interactive_module::operator = ( const interactive_module & ) { Modified: trunk/OpenMPT/libopenmpt/libopenmpt_internal.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_internal.h 2013-05-12 09:47:17 UTC (rev 2048) +++ trunk/OpenMPT/libopenmpt/libopenmpt_internal.h 2013-05-12 09:50:36 UTC (rev 2049) @@ -60,8 +60,12 @@ #ifdef __cplusplus namespace openmpt { namespace version { +#ifndef NO_WINAMP extern char * in_openmpt_string; +#endif // NO_WINAMP +#ifndef NO_XMPLAY extern const char * xmp_openmpt_string; +#endif // NO_XMPLAY } } // namespace openmpt::version #endif Modified: trunk/OpenMPT/libopenmpt/libopenmpt_stream_callbacks.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_stream_callbacks.h 2013-05-12 09:47:17 UTC (rev 2048) +++ trunk/OpenMPT/libopenmpt/libopenmpt_stream_callbacks.h 2013-05-12 09:50:36 UTC (rev 2049) @@ -77,14 +77,14 @@ return retval; } -static openmpt_stream_callbacks openmpt_stream_get_fd_callbacks(void) { +static inline openmpt_stream_callbacks openmpt_stream_get_fd_callbacks(void) { openmpt_stream_callbacks retval; memset( &retval, 0, sizeof( openmpt_stream_callbacks ) ); retval.read = openmpt_stream_fd_read_func; return retval; } -static openmpt_stream_callbacks openmpt_stream_get_file_callbacks(void) { +static inline openmpt_stream_callbacks openmpt_stream_get_file_callbacks(void) { openmpt_stream_callbacks retval; memset( &retval, 0, sizeof( openmpt_stream_callbacks ) ); retval.read = openmpt_stream_file_read_func; Modified: trunk/OpenMPT/libopenmpt/libopenmpt_version.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_version.cpp 2013-05-12 09:47:17 UTC (rev 2048) +++ trunk/OpenMPT/libopenmpt/libopenmpt_version.cpp 2013-05-12 09:50:36 UTC (rev 2049) @@ -95,9 +95,13 @@ #define OPENMPT_API_VERSION_STRING STRINGIZE(OPENMPT_API_VERSION_MAJOR)"."STRINGIZE(OPENMPT_API_VERSION_MINOR) +#ifndef NO_WINAMP char * in_openmpt_string = "in_openmpt " OPENMPT_API_VERSION_STRING "." STRINGIZE(OPENMPT_VERSION_REVISION); +#endif // NO_WINAMP +#ifndef NO_XMPLAY const char * xmp_openmpt_string = "OpenMPT (" OPENMPT_API_VERSION_STRING "." STRINGIZE(OPENMPT_VERSION_REVISION) ")"; +#endif // NO_XMPLAY } // namespace version Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-05-12 09:47:17 UTC (rev 2048) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-05-12 09:50:36 UTC (rev 2049) @@ -168,7 +168,9 @@ } typedef void (*PaUtilLogCallback ) (const char *log); +#ifdef _MSC_VER extern "C" void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb); +#endif class portaudio_raii { private: @@ -199,8 +201,10 @@ } else { portaudio_log_stream = 0; } +#ifdef _MSC_VER PaUtil_SetDebugPrintFunction( portaudio_log_function ); log_set = true; +#endif check_portaudio_error( Pa_Initialize() ); portaudio_initialized = true; if ( verbose ) { @@ -213,10 +217,12 @@ portaudio_initialized = false; } if ( log_set ) { +#ifdef _MSC_VER PaUtil_SetDebugPrintFunction( NULL ); - portaudio_log_stream = 0; log_set = false; +#endif } + portaudio_log_stream = 0; } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |