Opened 9 years ago

Closed 9 years ago

#8524 closed Bugs (fixed)

Serialization library warnings

Reported by: lcarreon@… Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.53.0 Severity: Problem
Keywords: serialization warning Cc:

Description

Hi,

I built Boost 1.53.0 on Fedora 18 32/64-bit using the following command:

./b2 link=shared runtime-link=shared address-model=32|64 variant=release

and received the following messages:

libs/serialization/src/basic_iarchive.cpp: In member function ‘const boost::archive::detail::basic_pointer_iserializer* boost::archive::detail::basic_iarchive_impl::load_pointer(boost::archive::detail::basic_iarchive&, void*&, const boost::archive::detail::basic_pointer_iserializer*, const boost::archive::detail::basic_pointer_iserializer* (*)(const boost::serialization::extended_type_info&))’: libs/serialization/src/basic_iarchive.cpp:437:23: warning: variable ‘new_cid’ set but not used [-Wunused-but-set-variable] libs/serialization/src/basic_serializer_map.cpp: In member function ‘bool boost::archive::detail::basic_serializer_map::insert(const boost::archive::detail::basic_serializer*)’: libs/serialization/src/basic_serializer_map.cpp:46:47: warning: variable ‘result’ set but not used [-Wunused-but-set-variable] In file included from ./boost/archive/impl/basic_text_iprimitive.ipp:31:0,

from libs/serialization/src/basic_text_iprimitive.cpp:19:

./boost/archive/iterators/transform_width.hpp: In instantiation of ‘boost::archive::iterators::transform_width<Base, BitsOut, BitsIn, CharType>::transform_width(const boost::archive::iterators::transform_width<Base, BitsOut, BitsIn, CharType>&) [with Base = boost::archive::iterators::binary_from_base64<boost::archive::iterators::remove_whitespace<boost::archive::iterators::istream_iterator<char> >, char>; int BitsOut = 8; int BitsIn = 6; CharType = char]’: ./boost/archive/impl/basic_text_iprimitive.ipp:94:5: required from ‘void boost::archive::basic_text_iprimitive<IStream>::load_binary(void*, std::size_t) [with IStream = std::basic_istream<char>; std::size_t = unsigned int]’ libs/serialization/src/basic_text_iprimitive.cpp:25:16: required from here ./boost/archive/iterators/transform_width.hpp:104:18: warning: ‘boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base64<boost::archive::iterators::remove_whitespace<boost::archive::iterators::istream_iterator<char> >, char>, 8, 6, char>::m_remaining_bits’ will be initialized after [-Wreorder] ./boost/archive/iterators/transform_width.hpp:101:21: warning: ‘boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base64<boost::archive::iterators::remove_whitespace<boost::archive::iterators::istream_iterator<char> >, char>, 8, 6, char>::base_value_type boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base64<boost::archive::iterators::remove_whitespace<boost::archive::iterators::istream_iterator<char> >, char>, 8, 6, char>::m_buffer_in’ [-Wreorder] ./boost/archive/iterators/transform_width.hpp:119:5: warning: when initialized here [-Wreorder] ./boost/archive/iterators/transform_width.hpp: In member function ‘void boost::archive::basic_text_iprimitive<IStream>::load_binary(void*, std::size_t) [with IStream = std::basic_istream<char>; std::size_t = unsigned int]’: ./boost/archive/iterators/transform_width.hpp:153:65: warning: ‘i.boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base64<boost::archive::iterators::remove_whitespace<boost::archive::iterators::istream_iterator<char> >, char>, 8, 6, char>::m_buffer_in’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Attachments (1)

8524.patch (1.0 KB ) - added by Jeremiah Willcock 9 years ago.
Patch for warnings

Download all attachments as: .zip

Change History (4)

by Jeremiah Willcock, 9 years ago

Attachment: 8524.patch added

Patch for warnings

comment:1 by Jeremiah Willcock, 9 years ago

The attached patch, plus the fix for #8525, appears to silence the warnings.

comment:2 by Johan Lundberg <lundberj@…>, 9 years ago

The issue remains in boost 1.54 beta1

the method looks like this (removing comments):

BOOST_ARCHIVE_DECL(bool) basic_serializer_map::insert(const basic_serializer * bs){

const std::pair<map_type::iterator, bool> result =

m_map.insert(bs);

return true;

}

comment:3 by Robert Ramey, 9 years ago

Resolution: fixed
Status: newclosed

patched

Note: See TracTickets for help on using tickets.