compilation warning on HEAD

The HEAD in trunk have some compilation warnings using gcc 4.7.2 the following will fix some of those. Another warning about unused result is in here: libs/serialization/src/basic_iarchive.cpp line 576, the value is used in a BOOST_ASSERT, I don't know how you manage those cases. Regards Gaetano Mendola Index: libs/serialization/src/basic_serializer_map.cpp =================================================================== --- libs/serialization/src/basic_serializer_map.cpp (revision 81900) +++ libs/serialization/src/basic_serializer_map.cpp (working copy) @@ -43,8 +43,7 @@ BOOST_ARCHIVE_DECL(bool) basic_serializer_map::insert(const basic_serializer * bs){ // attempt to insert serializer into it's map - const std::pair<map_type::iterator, bool> result = - m_map.insert(bs); + m_map.insert(bs); // the following is commented out - rather than being just // deleted as a reminder not to try this. Index: boost/archive/iterators/transform_width.hpp =================================================================== --- boost/archive/iterators/transform_width.hpp (revision 81900) +++ boost/archive/iterators/transform_width.hpp (working copy) @@ -112,6 +112,7 @@ transform_width(BOOST_PFTO_WRAPPER(T) start) : super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), m_buffer_out_full(false), + m_buffer_in(), m_remaining_bits(0), m_end_of_sequence(false) {} @@ -119,8 +120,8 @@ transform_width(const transform_width & rhs) : super_t(rhs.base_reference()), m_buffer_out_full(rhs.m_buffer_out_full), + m_buffer_in(rhs.m_buffer_in), m_remaining_bits(rhs.m_remaining_bits), - m_buffer_in(rhs.m_buffer_in), m_end_of_sequence(false) {} }; -- cpp-today.blogspot.it

On Fri, Dec 14, 2012 at 4:04 AM, Gaetano Mendola <mendola@gmail.com> wrote:
The HEAD in trunk have some compilation warnings using gcc 4.7.2 the following will fix some of those.
Another warning about unused result is in here:
libs/serialization/src/basic_iarchive.cpp line 576, the value is used in a BOOST_ASSERT, I don't know how you manage those cases.
Typically the following will work: int result = GetMeaningOfLife(); (void)result; // Tell the compiler to be quiet. Does not affect codegen. BOOST_ASSERT(result == 42);

On Thu, Dec 13, 2012 at 10:26 PM, Joshua Boyce <raptorfactor@raptorfactor.com> wrote:
On Fri, Dec 14, 2012 at 4:04 AM, Gaetano Mendola <mendola@gmail.com> wrote:
The HEAD in trunk have some compilation warnings using gcc 4.7.2 the following will fix some of those.
Another warning about unused result is in here:
libs/serialization/src/basic_iarchive.cpp line 576, the value is used in a BOOST_ASSERT, I don't know how you manage those cases.
Typically the following will work: int result = GetMeaningOfLife(); (void)result; // Tell the compiler to be quiet. Does not affect codegen. BOOST_ASSERT(result == 42);
BOOST_VERIFY(42 == GetMeaningOfLife()); ? -- Olaf

On 14/12/2012 13:16, Joshua Boyce wrote:
On Fri, Dec 14, 2012 at 10:36 AM, Olaf van der Spek <ml@vdspek.org> wrote:
BOOST_VERIFY
Ah yes, I forgot about that macro. I only use the raw 'assert'. That's a better solution.
When writing code in Boost, you should use BOOST_ASSERT_MSG, not the raw assert.
participants (4)
-
Gaetano Mendola
-
Joshua Boyce
-
Mathias Gaunard
-
Olaf van der Spek