Boost C++ Libraries: Ticket #8525: Iterator library warnings https://svn.boost.org/trac10/ticket/8525 <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> ./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 = const char*; int <a class="missing wiki">BitsOut</a> = 6; int <a class="missing wiki">BitsIn</a> = 8; <a class="missing wiki">CharType</a> = char]’: ./boost/archive/iterators/base64_from_binary.hpp:103:9: required from ‘boost::archive::iterators::base64_from_binary&lt;Base, <a class="missing wiki">CharType</a>&gt;::base64_from_binary(const boost::archive::iterators::base64_from_binary&lt;Base, <a class="missing wiki">CharType</a>&gt;&amp;) [with Base = boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;; <a class="missing wiki">CharType</a> = char]’ ./boost/iterator/iterator_adaptor.hpp:276:28: required from ‘boost::iterator_adaptor&lt;Derived, Base, Value, Traversal, Reference, Difference&gt;::iterator_adaptor(const Base&amp;) [with Derived = boost::archive::iterators::insert_linebreaks&lt;boost::archive::iterators::base64_from_binary&lt;boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt; &gt;, 76, const char&gt;; Base = boost::archive::iterators::base64_from_binary&lt;boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt; &gt;; Value = const char; Traversal = boost::single_pass_traversal_tag; Reference = const char; Difference = boost::use_default]’ ./boost/archive/iterators/insert_linebreaks.hpp:88:18: required from ‘boost::archive::iterators::insert_linebreaks&lt;Base, N, <a class="missing wiki">CharType</a>&gt;::insert_linebreaks(T) [with T = const char*; Base = boost::archive::iterators::base64_from_binary&lt;boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt; &gt;; int N = 76; <a class="missing wiki">CharType</a> = const char]’ ./boost/archive/impl/basic_text_oprimitive.ipp:60:5: required from ‘void boost::archive::basic_text_oprimitive&lt;OStream&gt;::save_binary(const void*, std::size_t) [with OStream = std::basic_ostream&lt;char&gt;; std::size_t = unsigned int]’ libs/serialization/src/basic_text_oprimitive.cpp:25:16: required from here ./boost/archive/iterators/transform_width.hpp:104:18: warning: ‘boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;::m_remaining_bits’ will be initialized after [-Wreorder] ./boost/archive/iterators/transform_width.hpp:101:21: warning: ‘boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;::base_value_type boost::archive::iterators::transform_width&lt;const char*, 6, 8&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;wchar_t&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;wchar_t&gt; &gt;, wchar_t&gt;, 8, 6, wchar_t&gt;::m_buffer_in’ may be used uninitialized in this function [-Wmaybe-uninitialized] In file included from ./boost/archive/impl/basic_text_iprimitive.ipp:31:0, </p> <blockquote> <p> from libs/serialization/src/basic_text_wiprimitive.cpp:25: </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;wchar_t&gt; &gt;, wchar_t&gt;; int <a class="missing wiki">BitsOut</a> = 8; int <a class="missing wiki">BitsIn</a> = 6; <a class="missing wiki">CharType</a> = wchar_t]’: ./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;wchar_t&gt;; std::size_t = unsigned int]’ libs/serialization/src/basic_text_wiprimitive.cpp:30: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;wchar_t&gt; &gt;, wchar_t&gt;, 8, 6, wchar_t&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;wchar_t&gt; &gt;, wchar_t&gt;, 8, 6, wchar_t&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;wchar_t&gt; &gt;, wchar_t&gt;, 8, 6, wchar_t&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;wchar_t&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;wchar_t&gt; &gt;, wchar_t&gt;, 8, 6, wchar_t&gt;::m_buffer_in’ may be used uninitialized in this function [-Wmaybe-uninitialized] ./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 = const char*; int <a class="missing wiki">BitsOut</a> = 6; int <a class="missing wiki">BitsIn</a> = 8; <a class="missing wiki">CharType</a> = char]’: ./boost/archive/iterators/base64_from_binary.hpp:103:9: required from ‘boost::archive::iterators::base64_from_binary&lt;Base, <a class="missing wiki">CharType</a>&gt;::base64_from_binary(const boost::archive::iterators::base64_from_binary&lt;Base, <a class="missing wiki">CharType</a>&gt;&amp;) [with Base = boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;; <a class="missing wiki">CharType</a> = char]’ ./boost/iterator/iterator_adaptor.hpp:276:28: required from ‘boost::iterator_adaptor&lt;Derived, Base, Value, Traversal, Reference, Difference&gt;::iterator_adaptor(const Base&amp;) [with Derived = boost::archive::iterators::insert_linebreaks&lt;boost::archive::iterators::base64_from_binary&lt;boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt; &gt;, 76, const char&gt;; Base = boost::archive::iterators::base64_from_binary&lt;boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt; &gt;; Value = const char; Traversal = boost::single_pass_traversal_tag; Reference = const char; Difference = boost::use_default]’ ./boost/archive/iterators/insert_linebreaks.hpp:88:18: required from ‘boost::archive::iterators::insert_linebreaks&lt;Base, N, <a class="missing wiki">CharType</a>&gt;::insert_linebreaks(T) [with T = const char*; Base = boost::archive::iterators::base64_from_binary&lt;boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt; &gt;; int N = 76; <a class="missing wiki">CharType</a> = const char]’ ./boost/archive/impl/basic_text_oprimitive.ipp:60:5: required from ‘void boost::archive::basic_text_oprimitive&lt;OStream&gt;::save_binary(const void*, std::size_t) [with OStream = std::basic_ostream&lt;wchar_t&gt;; std::size_t = unsigned int]’ libs/serialization/src/basic_text_woprimitive.cpp:30:16: required from here ./boost/archive/iterators/transform_width.hpp:104:18: warning: ‘boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;::m_remaining_bits’ will be initialized after [-Wreorder] ./boost/archive/iterators/transform_width.hpp:101:21: warning: ‘boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;::base_value_type boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;::m_buffer_in’ [-Wreorder] ./boost/archive/iterators/transform_width.hpp:119:5: warning: when initialized here [-Wreorder] </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8525 Trac 1.4.3 Jeremiah Willcock Sat, 11 May 2013 19:22:16 GMT attachment set https://svn.boost.org/trac10/ticket/8525 https://svn.boost.org/trac10/ticket/8525 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">8525.patch</span> </li> </ul> <p> Patch for warnings </p> Ticket Jeremiah Willcock Sat, 11 May 2013 19:25:29 GMT <link>https://svn.boost.org/trac10/ticket/8525#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8525#comment:1</guid> <description> <p> I have now added a patch for this issue. I fixed the uninitialized member warning even though it appears to be a false positive since the fix was inexpensive. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Sat, 11 May 2013 19:34:34 GMT</pubDate> <title>owner, component changed https://svn.boost.org/trac10/ticket/8525#comment:2 https://svn.boost.org/trac10/ticket/8525#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">jeffrey.hellrung</span> to <span class="trac-author">Robert Ramey</span> </li> <li><strong>component</strong> <span class="trac-field-old">iterator</span> → <span class="trac-field-new">serialization</span> </li> </ul> Ticket Johan Lundberg <lundberj@…> Wed, 19 Jun 2013 09:29:11 GMT <link>https://svn.boost.org/trac10/ticket/8525#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8525#comment:3</guid> <description> <p> Several (perhaps not all?) of these warnings remain with boost 1.54 beta1. specifically </p> <p> ./boost/archive/iterators/transform_width.hpp:101:21: warning: ‘boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;::base_value_type boost::archive::iterators::transform_width&lt;const char*, 6, 8&gt;::m_buffer_in’ [-Wreorder] </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 21 Aug 2013 03:52:22 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8525#comment:4 https://svn.boost.org/trac10/ticket/8525#comment:4 <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> patch applied </p> Ticket