Boost C++ Libraries: Ticket #1991: incomplete xtime/timespec initializers https://svn.boost.org/trac10/ticket/1991 <p> There appear to be missing initializers in the following two files: </p> <p> 1) boost/thread/pthread/timespec.hpp:18: warning: missing initializer for member `timespec::tv_nsec' </p> <p> 2) boost/thread/xtime.hpp:59: warning: missing initializer for member `boost::xtime::nsec' </p> <p> In both cases a struct with two ints was initialized by <a class="missing report" title="report does not exist">{0}</a>, which caused my compiler (cygwin gcc 3.4.4) to complain. I'm sure this was just because I have a bunch of warning flags turned on, but the fix is easy. Replacing the initializer with {0,0} fixed the problem. </p> <p> Build output follows </p> <hr /> <p> ~/BOOM2<a class="changeset" href="https://svn.boost.org/trac10/changeset/599" title="Levenshtein Edit Distance algorithm in linear space ">[599]</a> scons g++ -o debug/Models/Glm/PosteriorSamplers/MLVS_data_imputer.o -c -g -Wall -Wunused -Wextra -Werror -Woverloaded-virtual -Wsign-promo -Wno-uninitialized -Isrc -I/home/sls/include/boost/tr1/tr1 -I/home/sls/include debug/Models/Glm/PosteriorSamplers/MLVS_data_imputer.cpp In file included from /home/sls/include/boost/thread/pthread/mutex.hpp:18, </p> <blockquote> <p> from /home/sls/include/boost/thread/mutex.hpp:16, from /home/sls/include/boost/thread/pthread/thread.hpp:14, from /home/sls/include/boost/thread/thread.hpp:17, from /home/sls/include/boost/thread.hpp:12, from debug/Models/Glm/PosteriorSamplers/MLVS_data_imputer.cpp:21: </p> </blockquote> <p> /home/sls/include/boost/thread/pthread/timespec.hpp: In function `timespec boost::detail::get_timespec(const boost::system_time&amp;)': /home/sls/include/boost/thread/pthread/timespec.hpp:18: warning: missing initializer for member `timespec::tv_nsec' In file included from /home/sls/include/boost/thread/pthread/condition_variable_fwd.hpp:12, </p> <blockquote> <p> from /home/sls/include/boost/thread/pthread/thread_data.hpp:14, from /home/sls/include/boost/thread/pthread/condition_variable.hpp:14, from /home/sls/include/boost/thread/condition_variable.hpp:16, from /home/sls/include/boost/thread/pthread/thread.hpp:15, from /home/sls/include/boost/thread/thread.hpp:17, from /home/sls/include/boost/thread.hpp:12, from debug/Models/Glm/PosteriorSamplers/MLVS_data_imputer.cpp:21: </p> </blockquote> <p> /home/sls/include/boost/thread/xtime.hpp: In function `boost::xtime boost::get_xtime(const boost::system_time&amp;)': /home/sls/include/boost/thread/xtime.hpp:59: warning: missing initializer for member `boost::xtime::nsec' scons: <strong>* [debug/Models/Glm/PosteriorSamplers/MLVS_data_imputer.o] Error 1 </strong></p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1991 Trac 1.4.3 Anthony Williams Thu, 05 Jun 2008 21:41:47 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1991#comment:1 https://svn.boost.org/trac10/ticket/1991#comment:1 <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">duplicate</span> </li> </ul> <p> This is a duplicate of a previous issue. Already fixed on trunk. </p> Ticket