Received: by efs01.eventmine.local  id
	<01C6E30B.1C0AC9A2@efs01.eventmine.local>;
	Thu, 28 Sep 2006 15:33:48 +0100
Content-class: urn:content-classes:message
Subject: Warnings with microsec_time_clock.hpp with VC8.0
Date: Thu, 28 Sep 2006 15:33:48 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C6E30B.1C0AC9A2"
Message-ID: <583C102FDFBE2E4FB8ADF0D680B0798C0598CD@efs01.eventmine.local>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Thread-Topic: Warnings with microsec_time_clock.hpp with VC8.0
Thread-Index: AcbjCxpNi2Bx+ceURzaKGab3nJ9lHw==
From: "David Wyles" <dwyles@mediagrids.com>
To: "Bill Somerville" <bsomerville@mediagrids.com>

This is a multi-part message in MIME format.

------_=_NextPart_001_01C6E30B.1C0AC9A2
Content-Type: text/plain; charset="windows-1250"
Content-Transfer-Encoding: quoted-printable

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

=20

Line: 156---

      boost::uint64_t filetime =3D ft.dwHighDateTime;

      filetime =3D filetime << 32;

      filetime +=3D ft.dwLowDateTime;

      filetime -=3D OFFSET;

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

=20

      boost::uint32_t sub_sec =3D (filetime % 10000000) / 10; // microsecon=
ds=20

^^^^^^^^^^^^^^^^^^^^^^^^=20

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

=20

Is this already fixed?

=20

=20

=20

Warning info =96 just for the hell of it.

=20

=20

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

        c:\engineering\eventmine_v2.0\source\3rdparty\boost\date_time\micro=
sec_time_clock.hpp(143) : while compiling class template member function 'b=
oost::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=3Dboost::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=3Dboost::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

=20

=20


--=20
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
=20

------_=_NextPart_001_01C6E30B.1C0AC9A2
Content-Type: text/html; charset="windows-1250"
Content-Transfer-Encoding: 7bit

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250">


<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>I have an issue with a cast warning between a uint64_t
and a uint32_t<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Line: 156---<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boost::uint64_t
filetime = ft.dwHighDateTime;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filetime = filetime
&lt;&lt; 32;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filetime +=
ft.dwLowDateTime;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filetime -= OFFSET;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // filetime now holds
100-nanoseconds since 1970-Jan-01<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boost::uint32_t
sub_sec = (filetime % 10000000) / 10; // microseconds <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>^^^^^^^^^^^^^^^^^^^^^^^^ <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>cast warning here as filetime is a uint64_t and
subsec is not.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Is this already fixed?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Warning info &#8211; just for the hell of it.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>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<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
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&lt;time_type&gt;::create_time(FILETIME
&amp;,boost::date_time::microsec_clock&lt;time_type&gt;::TZ_FOR_CREATE)'<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
time_type=boost::posix_time::ptime<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
c:\engineering\eventmine_v2.0\source\sockets\tcpcommander.cpp(109) : see
reference to class template instantiation
'boost::date_time::microsec_clock&lt;time_type&gt;' being compiled<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
time_type=boost::posix_time::ptime<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>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<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>
<BR>

<P><FONT SIZE=2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Free Edition.<BR>
Version: 7.1.407 / Virus Database: 268.12.9/458 - Release Date: 27/09/2006<BR>
</FONT> </P>

------_=_NextPart_001_01C6E30B.1C0AC9A2--
