[Boost-bugs] [Boost C++ Libraries] #5550: Missing initializer warning in date_time/date_facet.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #5550: Missing initializer warning in date_time/date_facet.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-05-18 18:43:44


#5550: Missing initializer warning in date_time/date_facet.hpp
------------------------------------------------+---------------------------
 Reporter: Derek McGowan <derek@…> | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.46.1 | Severity: Cosmetic
 Keywords: |
------------------------------------------------+---------------------------
 include/boost/date_time/date_facet.hpp is causing a compiler warning

 Compiler:
 gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)

 Compiler Options:
 g++4 -shared -fpic -g -Wall -Woverloaded-virtual -Werror -Wl,--warn-
 shared-textrel -Wl,--fatal-warnings


 {{{

 cc1plus: warnings being treated as errors
 boost_1_46_1/include/boost/date_time/date_facet.hpp: In member function
 â€˜OutItrT boost::date_time::date_facet<date_type, CharT,
 OutItrT>::put(OutItrT, std::ios_base&, CharT, const typename
 date_type::month_type&) const [with date_type = boost::gregorian::date,
 CharT = char, OutItrT = std::ostreambuf_iterator<char,
 std::char_traits<char> >]’:
 boost_1_46_1/include/boost/date_time/gregorian/gregorian_io.hpp:243:
 instantiated from ‘std::basic_ostream<_CharT, _Traits>&
 boost::gregorian::operator<<(std::basic_ostream<_CharT, _Traits>&, const
 boost::gregorian::greg_month&) [with CharT = char, TraitsT =
 std::char_traits<char>]’
 <source>.cpp:##: instantiated from here
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_sec’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_min’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_hour’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_mday’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_mon’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_year’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_wday’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_yday’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_isdst’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_gmtoff’
 boost_1_46_1/include/boost/date_time/date_facet.hpp:211: warning: missing
 initializer for member ‘tm::tm_zone’

 }}}


 std::tm dtm = {}; should be changed to something like std::tm dtm =
 std::tm();

 This same issue was addressed and fixed in #3563

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5550>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC