Boost C++ Libraries: Ticket #8524: Serialization library warnings https://svn.boost.org/trac10/ticket/8524 <p> Hi, </p> <p> I built Boost 1.53.0 on Fedora 18 32/64-bit using the following command: </p> <p> ./b2 link=shared runtime-link=shared address-model=32|64 variant=release </p> <p> and received the following messages: </p> <p> 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&amp;, void*&amp;, const boost::archive::detail::basic_pointer_iserializer*, const boost::archive::detail::basic_pointer_iserializer* (*)(const boost::serialization::extended_type_info&amp;))’: 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, </p> <blockquote> <p> from libs/serialization/src/basic_text_iprimitive.cpp:19: </p> </blockquote> <p> ./boost/archive/iterators/transform_width.hpp: In instantiation of ‘boost::archive::iterators::transform_width&lt;Base, <a class="missing wiki">BitsOut</a>, <a class="missing wiki">BitsIn</a>, <a class="missing wiki">CharType</a>&gt;::transform_width(const boost::archive::iterators::transform_width&lt;Base, <a class="missing wiki">BitsOut</a>, <a class="missing wiki">BitsIn</a>, <a class="missing wiki">CharType</a>&gt;&amp;) [with Base = boost::archive::iterators::binary_from_base64&lt;boost::archive::iterators::remove_whitespace&lt;boost::archive::iterators::istream_iterator&lt;char&gt; &gt;, char&gt;; int <a class="missing wiki">BitsOut</a> = 8; int <a class="missing wiki">BitsIn</a> = 6; <a class="missing wiki">CharType</a> = char]’: ./boost/archive/impl/basic_text_iprimitive.ipp:94:5: required from ‘void boost::archive::basic_text_iprimitive&lt;IStream&gt;::load_binary(void*, std::size_t) [with IStream = std::basic_istream&lt;char&gt;; 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&lt;boost::archive::iterators::binary_from_base64&lt;boost::archive::iterators::remove_whitespace&lt;boost::archive::iterators::istream_iterator&lt;char&gt; &gt;, char&gt;, 8, 6, char&gt;::m_remaining_bits’ will be initialized after [-Wreorder] ./boost/archive/iterators/transform_width.hpp:101:21: warning: ‘boost::archive::iterators::transform_width&lt;boost::archive::iterators::binary_from_base64&lt;boost::archive::iterators::remove_whitespace&lt;boost::archive::iterators::istream_iterator&lt;char&gt; &gt;, char&gt;, 8, 6, char&gt;::base_value_type boost::archive::iterators::transform_width&lt;boost::archive::iterators::binary_from_base64&lt;boost::archive::iterators::remove_whitespace&lt;boost::archive::iterators::istream_iterator&lt;char&gt; &gt;, char&gt;, 8, 6, char&gt;::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&lt;IStream&gt;::load_binary(void*, std::size_t) [with IStream = std::basic_istream&lt;char&gt;; std::size_t = unsigned int]’: ./boost/archive/iterators/transform_width.hpp:153:65: warning: ‘i.boost::archive::iterators::transform_width&lt;boost::archive::iterators::binary_from_base64&lt;boost::archive::iterators::remove_whitespace&lt;boost::archive::iterators::istream_iterator&lt;char&gt; &gt;, char&gt;, 8, 6, char&gt;::m_buffer_in’ may be used uninitialized in this function [-Wmaybe-uninitialized] </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8524 Trac 1.4.3 Jeremiah Willcock Sat, 11 May 2013 19:29:14 GMT attachment set https://svn.boost.org/trac10/ticket/8524 https://svn.boost.org/trac10/ticket/8524 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">8524.patch</span> </li> </ul> <p> Patch for warnings </p> Ticket Jeremiah Willcock Sat, 11 May 2013 19:29:45 GMT <link>https://svn.boost.org/trac10/ticket/8524#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8524#comment:1</guid> <description> <p> The attached patch, plus the fix for <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8525" title="#8525: Bugs: Iterator library warnings (closed: fixed)">#8525</a>, appears to silence the warnings. </p> </description> <category>Ticket</category> </item> <item> <author>Johan Lundberg <lundberj@…></author> <pubDate>Wed, 19 Jun 2013 09:17:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8524#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8524#comment:2</guid> <description> <p> The issue remains in boost 1.54 beta1 </p> <p> the method looks like this (removing comments): </p> <p> BOOST_ARCHIVE_DECL(bool) basic_serializer_map::insert(const basic_serializer * bs){ </p> <blockquote> <p> const std::pair&lt;map_type::iterator, bool&gt; result = </p> <blockquote> <p> m_map.insert(bs); </p> </blockquote> <p> return true; </p> </blockquote> <p> } </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 21 Aug 2013 03:59:21 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8524#comment:3 https://svn.boost.org/trac10/ticket/8524#comment:3 <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">fixed</span> </li> </ul> <p> patched </p> Ticket