Boost C++ Libraries: Ticket #3477: warning: missing initializer for member ‘tm::tm_sec’ .. https://svn.boost.org/trac10/ticket/3477 <p> We recently upgraded to boost 1.40 and now we got some new warnings from GCC: </p> <pre class="wiki">warning: missing initializer for member ‘tm::tm_sec’ ... </pre><p> I've attached a patch that fixes these (at least for the code we use, there might be other occurences). </p> <p> Regards </p> <p> Mirko </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3477 Trac 1.4.3 me@… Tue, 22 Sep 2009 12:56:20 GMT attachment set https://svn.boost.org/trac10/ticket/3477 https://svn.boost.org/trac10/ticket/3477 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">date_time.patch</span> </li> </ul> Ticket Marshall Clow Sun, 28 Mar 2010 15:45:21 GMT <link>https://svn.boost.org/trac10/ticket/3477#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3477#comment:1</guid> <description> <p> My testing shows that gcc 4.2.1 does not generate this error. </p> <pre class="wiki">#include &lt;boost/date_time/gregorian/conversion.hpp&gt; int main ( int argc, char *argv[] ) {} $ g++ -I /Marshall/Sources/boost/boost_1_42_0 -wAll junk.cpp $ $ g++ --version i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1) </pre><p> Comment (via email) from <a class="missing wiki">AndySem</a>: </p> <p> I'm not sure the patch is valid. std::tm can have different number of members on different compilers and thus the patch may bring either warnings or errors on other platforms. And the warning is nonsense in the first place, because zero initialization is intended to be done by the compiler (which it actually does). </p> <p> I think, at least conditional compilation should be used in this case. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Sat, 05 Jun 2010 17:13:12 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3477#comment:2 https://svn.boost.org/trac10/ticket/3477#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> Ticket