id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6898,Compiler warning when using boost::posix_time::from_ftime.,oscar.lara@…,Andrey Semashev,"VC2005 compiler reports a compilation warning when using from_time function. 1>c:\workspace\boost\boost\date_time\filetime_functions.hpp(146) : warning C4244: 'initializing' : conversion from 'boost::uint64_t' to 'boost::uint32_t', possible loss of data 1> c:\workspace\boost\boost\date_time\posix_time\conversion.hpp(81) : see reference to function template instantiation 'TimeT boost::date_time::time_from_ftime(const FileTimeT &)' being compiled 1> with 1> [ 1> TimeT=boost::posix_time::ptime, 1> FileTimeT=FILETIME 1> ] 1> c:\workspace\blah\rainbowkeyimpl.cpp(126) : see reference to function template instantiation 'TimeT boost::posix_time::from_ftime(const FileTimeT &)' being compiled 1> with 1> [ 1> TimeT=boost::posix_time::ptime, 1> FileTimeT=FILETIME 1> ] Looking the code in the latest Boost version the line that the warning is pointing hasn't changed. {{{ uint32_t sub_sec = (caster.as_integer % 10000000UL) #if !defined(BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG) / 10; // microseconds since the last second #else * 100; // nanoseconds since the last second #endif }}} A quick way to resolve it would be to static_cast the results. The cast shouldn't cause any data loss as the mod is and the multiplication are keeping the maximum value within the uint32_t range. ",Bugs,closed,Boost 1.66.0,date_time,Boost 1.42.0,Cosmetic,fixed,,