Boost C++ Libraries: Ticket #2816: microsec_clock::create_time(TZ_FOR_CREATE tz) causes 64-to-32 bit warning on 64 bit targets https://svn.boost.org/trac10/ticket/2816 <p> resolution_traits_type::res_adjust() returns a 64 bit integer when boost is built for a 64 bit target. This leads to a warning about possible truncation when compiling the version of microsec_clock::create_time() that takes a single TZ_FOR_CREATE parameter with -Wshorten-64-to-32 on GCC 4.0.1 for MacOSX. The other version of microsec_clock::create_time() already contains a static_cast to int that prevents this warning. The cast should be used in both methods: </p> <pre class="wiki">int adjust = static_cast&lt;int&gt;(resolution_traits_type::res_adjust()/1000000); </pre><p> This appears to be fixed in revision @49705 on the release branch (along with a good deal of additional restructuring). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2816 Trac 1.4.3 Steven Watanabe Tue, 03 Mar 2009 04:51:07 GMT component changed; owner set https://svn.boost.org/trac10/ticket/2816#comment:1 https://svn.boost.org/trac10/ticket/2816#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">az_sw_dude</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">date_time</span> </li> </ul> Ticket Andrey Semashev Thu, 04 Jun 2009 10:14:13 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2816#comment:2 https://svn.boost.org/trac10/ticket/2816#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> As the OP notes, fixed in revision 49705. Released in 1.38. </p> Ticket