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