Subject: Warnings with microsec_time_clock.hpp with VC8.0
From: "David Wyles" <[email-masked]>
To: "Bill Somerville" <[email-masked]>
Date: Thu, 28 Sep 2006 15:33:48 +0100

I have an issue with a cast warning between a uint64_t and a uint32_t

Line: 156---

      boost::uint64_t filetime = ft.dwHighDateTime;

      filetime = filetime << 32;

      filetime += ft.dwLowDateTime;

      filetime -= OFFSET;

      // filetime now holds 100-nanoseconds since 1970-Jan-01

      boost::uint32_t sub_sec = (filetime % 10000000) / 10; // microseconds 

^^^^^^^^^^^^^^^^^^^^^^^^ 

cast warning here as filetime is a uint64_t and subsec is not.

Is this already fixed?

 

Warning info – just for the hell of it.

 

c:\engineering\eventmine_v2.0\source\3rdparty\boost\date_time\microsec_time_clock.hpp(156) : warning C4244: 'initializing' : conversion from 'boost::uint64_t' to 'boost::uint32_t', possible loss of data

        c:\engineering\eventmine_v2.0\source\3rdparty\boost\date_time\microsec_time_clock.hpp(143) : while compiling class template member function 'boost::posix_time::ptime boost::date_time::microsec_clock<time_type>::create_time(FILETIME &,boost::date_time::microsec_clock<time_type>::TZ_FOR_CREATE)'

        with

        [

            time_type=boost::posix_time::ptime

        ]

        c:\engineering\eventmine_v2.0\source\sockets\tcpcommander.cpp(109) : see reference to class template instantiation 'boost::date_time::microsec_clock<time_type>' being compiled

        with

        [

            time_type=boost::posix_time::ptime

        ]

c:\engineering\eventmine_v2.0\source\3rdparty\boost\date_time\microsec_time_clock.hpp(175) : warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data

 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.9/458 - Release Date: 27/09/2006