Subject: [Boost-bugs] [Boost C++ Libraries] #6118: Uuid random_generator compiles with warnings by GCC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-12 16:24:06
#6118: Uuid random_generator compiles with warnings by GCC
---------------------------------------------+------------------------------
Reporter: Vasily Sukhanov <basil@â¦> | Owner: atompkins
Type: Bugs | Status: new
Milestone: To Be Determined | Component: uuid
Version: Boost 1.47.0 | Severity: Problem
Keywords: warning |
---------------------------------------------+------------------------------
uuids::random_generator constructor emits warning when compiled with GCC:
>g++ -O2 -Wall -Werror uuidTest.cpp[[BR]]
On Linux x86_64, gcc 4.5.2 output is
/home/vasily/boost_1_47_0/boost/uuid/seed_rng.hpp: In member function
âvoid boost::uuids::detail::seed_rng::sha1_random_digest_()â:
/home/vasily/boost_1_47_0/boost/uuid/seed_rng.hpp:152:53: error: ignoring
return value of âsize_t fread(void*, size_t, size_t, FILE*)â, declared
with attribute warn_unused_result
Cross gcc 4.5.3 (Linux -> Solaris) and gcc 4.6.1 (Linux -> AIX) produce
In file included from testBoostUuid.cpp:3:0:
/emc/sukhav/cross/boost_1_47_0/boost/uuid/seed_rng.hpp: In constructor
âboost::uuids::basic_random_generator<UniformRandomNumberGenerator>::basic_random_generator()
[with UniformRandomNumberGenerator =
boost::random::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul,
31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u,
18ul, 1812433253u>]â:
/emc/sukhav/cross/boost_1_47_0/boost/uuid/seed_rng.hpp:243:34: error:
âend.boost::uuids::detail::generator_iterator<boost::uuids::detail::seed_rng>::m_valueâ
may be used uninitialized in this function [-Werror=uninitialized]
Latter warning is regression. Compilation passes with boost 1.46.1.
Probably, it's caused by some changes in Random library.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6118> 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:07 UTC