Index: basic_timed_mutex.hpp =================================================================== --- basic_timed_mutex.hpp (revision 41439) +++ basic_timed_mutex.hpp (working copy) @@ -33,7 +33,15 @@ void destroy() { +#if defined(BOOST_MSVC) && !(defined(_M_IA64) || defined(_M_AMD64)) +// disable: warning C4312: 'type cast' : conversion from 'long' to 'void *' of greater size +#pragma warning (push) +#pragma warning (disable: 4312) +#endif void* const old_event=BOOST_INTERLOCKED_EXCHANGE_POINTER(&event,0); +#if defined(BOOST_MSVC) && !(defined(_M_IA64) || defined(_M_AMD64)) +#pragma warning (pop) +#endif if(old_event) { win32::CloseHandle(old_event); @@ -133,7 +141,16 @@ if(!current_event) { void* const new_event=win32::create_anonymous_event(win32::auto_reset_event,win32::event_initially_reset); +#if defined(BOOST_MSVC) && !(defined(_M_IA64) || defined(_M_AMD64)) +// disable: warning C4311: 'type cast' : pointer truncation from 'void *const ' to 'long' +// disable: warning C4312: 'type cast' : conversion from 'long' to 'void *' of greater size +#pragma warning (push) +#pragma warning (disable: 4311 4312) +#endif void* const old_event=BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(&event,new_event,0); +#if defined(BOOST_MSVC) && !(defined(_M_IA64) || defined(_M_AMD64)) +#pragma warning (pop) +#endif if(old_event!=0) { win32::CloseHandle(new_event);