Opened 20 years ago

Closed 19 years ago

#131 closed Bugs (Fixed)

date warning (long / short conversion)

Reported by: frankbuss Owned by: az_sw_dude
Milestone: Component: date_time
Version: None Severity:
Keywords: Cc:

Description

Visual Studio .NET says for line 62 of 
boost/date_time/gregorian_calendar.ipp (unsigned short 
month = m + 3 - 12 * (m/10);) "warning 
C4244: 'initializing' : conversion from 'unsigned long' 
to 'unsigned short', possible loss of data", because "m" 
is of type "date_int_type", which is unsinged long, I 
think, and "month" is of type "unsigned short". Same 
problem in line 66 for the "year" argument:"conversion 
from 'boost::date_time::gregorian_calendar_base<ymd_t
ype_,date_int_type_>::date_int_type' to 'unsigned 
short', possible loss of data"


Change History (2)

comment:1 by nobody, 20 years ago

Logged In: NO 

I encounter the same problems. And not only in 
boost/date_time/gregorian_calendar.ipp :(

Btw, could you please set normal carriage return in 
gregorian_calendar.ipp? Now it has 0x0D 0x0D 0x0A 
characters as carriage return sequence.

I use VC 6 Service Pack 5.

Thank you!

comment:2 by az_sw_dude, 19 years ago

Status: assignedclosed
Logged In: YES 
user_id=579686

These problems have been resolved in the 1_31 version of boost.
Note: See TracTickets for help on using tickets.