Opened 14 years ago

Closed 14 years ago

#2612 closed Bugs (fixed)

[date_time] warning for use of uninitialized variable

Reported by: manfred doudar <manfred.doudar@…> Owned by: az_sw_dude
Milestone: Boost 1.38.0 Component: date_time
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc: manfred.doudar@…

Description

/import/apu/projects/1/VISTA/vibe/usr/BOOST/include/boost-1_37/boost/date_time/constrained_value.hpp: In static member function 'static ymd_type_ boost::date_time::gregorian_calendar_base<ymd_type_, date_int_type_>::from_day_number(date_int_type_) [with ymd_type_ = boost::date_time::year_month_day_base<boost::gregorian::greg_year, boost::gregorian::greg_month, boost::gregorian::greg_day>, date_int_type_ = long unsigned int]': /import/apu/projects/1/VISTA/vibe/usr/BOOST/include/boost-1_37/boost/date_time/constrained_value.hpp:64: warning: 'year.boost::gregorian::greg_year::<anonymous>.boost::CV::constrained_value<boost::CV::simple_exception_policy<short unsigned int, 1400u, 10000u, boost::gregorian::bad_year> >::value_' is used uninitialized in this function /import/apu/projects/1/VISTA/vibe/usr/BOOST/include/boost-1_37/boost/date_time/gregorian_calendar.ipp:122: note: 'year.boost::gregorian::greg_year::<anonymous>.boost::CV::constrained_value<boost::CV::simple_exception_policy<short unsigned int, 1400u, 10000u, boost::gregorian::bad_year> >::value_' was declared here

PLATFORM: ubuntu linux COMPILER: gcc-4.3.0 DATE_TIME flags: -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG COMPILER flags: -Wall -Werror -03 -g -ansi -pedantic

Change History (2)

comment:1 by manfred doudar <manfred.doudar@…>, 14 years ago

Cc: manfred.doudar@… added

comment:2 by manfred doudar <manfred.doudar@…>, 14 years ago

Resolution: fixed
Status: newclosed

Alerted by Andrey Semashev that this has been fixed. Did check trunk & branch-release for 1.38, and warnings when optimizations are turned on are now extant.

Note: See TracTickets for help on using tickets.