Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-10-01 12:58:04


Bill Somerville wrote:
>
> ------------------------------------------------------------------------
>
> Subject:
> Warnings with microsec_time_clock.hpp with VC8.0
> From:
> "David Wyles" <dwyles_at_[hidden]>
> Date:
> Thu, 28 Sep 2006 15:33:48 +0100
> To:
> "Bill Somerville" <bsomerville_at_[hidden]>
>
> To:
> "Bill Somerville" <bsomerville_at_[hidden]>
>
>
> 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?

Yes, the microsec_time_clock is fixed in CVS and will be in 1.34. I don't see
  any unit32 calcs in from ftime. Maybe you can try out the latest cvs or
1.34 rc and see?

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net