Subject: [Boost-bugs] [Boost C++ Libraries] #1991: incomplete xtime/timespec initializers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-06-05 19:12:42
#1991: incomplete xtime/timespec initializers
--------------------------------------------------------+-------------------
Reporter: Steven Scott <Steven.Scott_at_[hidden]> | Owner: anthonyw
Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: thread
Version: Boost 1.35.0 | Severity: Problem
Keywords: timespec/xtime initializer |
--------------------------------------------------------+-------------------
There appear to be missing initializers in the following two files:
1) boost/thread/pthread/timespec.hpp:18: warning: missing initializer for
member `timespec::tv_nsec'
2) boost/thread/xtime.hpp:59: warning: missing initializer for member
`boost::xtime::nsec'
In both cases a struct with two ints was initialized by {0}, 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.
Build output follows
------------------
~/BOOM2[599] 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,
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:
/home/sls/include/boost/thread/pthread/timespec.hpp: In function `timespec
boost::detail::get_timespec(const boost::system_time&)':
/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,
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:
/home/sls/include/boost/thread/xtime.hpp: In function `boost::xtime
boost::get_xtime(const boost::system_time&)':
/home/sls/include/boost/thread/xtime.hpp:59: warning: missing initializer
for member `boost::xtime::nsec'
scons: *** [debug/Models/Glm/PosteriorSamplers/MLVS_data_imputer.o] Error
1
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1991>
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:49:58 UTC