Boost C++ Libraries: Ticket #1618: Warnings need supressing https://svn.boost.org/trac10/ticket/1618 <p> Warnings need suppressing (at least these but probably more): </p> <p> iostreams/detail/adaptor/non_blocking.hpp </p> <p> #ifdef _MSC_VER # pragma warning (disable : 4512) <em> assignment operator could not be generated #endif </em></p> <p> iostreams\chain.hpp </p> <p> #if defined(_MSC_VER) &amp;&amp; (_MSC_VER &gt;= 1020) # pragma warning (disable : 4127) <em> expression is constant # pragma once #endif </em></p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1618 Trac 1.4.3 Richard Webb <Richard.Webb@…> Tue, 05 Feb 2008 18:03:02 GMT <link>https://svn.boost.org/trac10/ticket/1618#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1618#comment:1</guid> <description> <p> Have you tried testing this with 1.35 / Trunk?<br /> </p> <p> A lot of the warnings have already been fixed - see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1523" title="#1523: Bugs: [iostreams] VC8/VC9 compiler warnings (closed: fixed)">#1523</a> for an example. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Sat, 09 Feb 2008 18:20:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1618#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1618#comment:2</guid> <description> <p> Running the iostreams tests with VC9 and warning level 4 results in a few unreferenced parameter warnings: </p> <pre class="wiki">\boost/iostreams/filter/newline.hpp(401) : warning C4100: 'which' : unreferenced formal parameter \boost/iostreams/filter/newline.hpp(214) : warning C4100: 'which' : unreferenced formal parameter \boost/iostreams/filter/symmetric.hpp(155) : warning C4100: 'which' : unreferenced formal parameter </pre><p> Running the tests with code analysis enabled results in loads of 'sizeof usage' warnings: </p> <pre class="wiki">boost\iostreams\traits.hpp(49) : warning C6334: sizeof operator applied to an expression with an operator might yield unexpected results </pre><p> (which actually results from the usage of sizeof in the macro in bool_trait_def.hpp) I dont think it's really a problem, but it creates a lot of noise. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Sat, 09 Feb 2008 18:41:36 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/1618 https://svn.boost.org/trac10/ticket/1618 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">ios4a.zip</span> </li> </ul> <p> log of iostreams tests built with vc9/w4/code analysis </p> Ticket Jonathan Turkanis Mon, 26 May 2008 20:00:48 GMT status changed https://svn.boost.org/trac10/ticket/1618#comment:3 https://svn.boost.org/trac10/ticket/1618#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I believe the warnings 4512, 4127, and 4100 have all been addressed previously. </p> <p> I am unable to reproduce 6334, either because my versions of VC (8.0 pro and 9.0 express) don't support code analysis, or because I am too stupid to figure out how to turn it on. </p> <p> I have attempted to fix the problem in <a class="changeset" href="https://svn.boost.org/trac10/changeset/45788" title="disabled warning 6334 (sizeof operator ... might yield unexpected ...">[45788]</a> by disabling warning 6334 around invocations of BOOST_IOSTREAMS_BOOL_TRAIT_DEF in traits.hpp and detail/is_iterator_range.hpp. </p> <p> Please let me know if this resolves the issue. If not, please generate another log of VC output using the current trunk. </p> Ticket Richard Webb <richard.webb@…> Tue, 27 May 2008 20:02:08 GMT <link>https://svn.boost.org/trac10/ticket/1618#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1618#comment:4</guid> <description> <p> Thats fixed some of the 6334s. but there are some left (from other BOOST_IOSTREAMS_BOOL_TRAIT_DEF uses, and from BOOST_SELECT_BY_SIZE).<br /> </p> <p> Moving the 'pragma warning(pop)' further down the file silences those. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Tue, 27 May 2008 20:03:39 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/1618 https://svn.boost.org/trac10/ticket/1618 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">traits.diff</span> </li> </ul> Ticket Richard Webb <richard.webb@…> Tue, 27 May 2008 20:06:51 GMT attachment set https://svn.boost.org/trac10/ticket/1618 https://svn.boost.org/trac10/ticket/1618 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">iostreams.zip</span> </li> </ul> Ticket Jonathan Turkanis Tue, 27 May 2008 23:59:52 GMT <link>https://svn.boost.org/trac10/ticket/1618#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1618#comment:5</guid> <description> <p> Okay, I've moved the code suppressing 6334 into detail/config/disable_warnings.hpp and included that file in traits.hpp and is_iterator_range.hpp. This should cover all the code in those two files (see <a class="changeset" href="https://svn.boost.org/trac10/changeset/45843" title="moved code suppressing VC warning 6334 into disable_warnings.hpp">[45843]</a>) </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Thu, 29 May 2008 22:13:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1618#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1618#comment:6</guid> <description> <p> Ok, that seems to have got them all now :) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jonathan Turkanis</dc:creator> <pubDate>Thu, 29 May 2008 22:45:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1618#comment:7 https://svn.boost.org/trac10/ticket/1618#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket Richard Webb <richard.webb@…> Sat, 14 Jun 2008 11:43:07 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/1618#comment:8 https://svn.boost.org/trac10/ticket/1618#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Looking at the test results (e.g. <a class="ext-link" href="http://tinyurl.com/5jawvj"><span class="icon">​</span>http://tinyurl.com/5jawvj</a>), i notice that there is now an extra warning on VC7.1 because C6334 only exists on VC8+: </p> <pre class="wiki">boost\iostreams\detail\config\disable_warnings.hpp(19) : warning C4616: #pragma warning : warning number '6334' out of range, must be between '4001' and '4999' </pre><p> This can be fixed by only disabling 6334 on visual studio 8 or newer. Sorry for not thinking of this earlier. </p> Ticket Jonathan Turkanis Sat, 14 Jun 2008 18:27:08 GMT <link>https://svn.boost.org/trac10/ticket/1618#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1618#comment:9</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/46394" title="limitted disabling of compiler warning 6334 to VC8.0+ (see #1618)">[46394]</a>) limitted disabling of compiler warning 6334 to VC8.0+ (see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1618" title="#1618: Feature Requests: Warnings need supressing (closed: fixed)">#1618</a>) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jonathan Turkanis</dc:creator> <pubDate>Sat, 14 Jun 2008 18:31:23 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1618#comment:10 https://svn.boost.org/trac10/ticket/1618#comment:10 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> That's funny. I remember planning to test "pragma warning(disable:9999)" on VC8.0 to see if it produced an "unknown warning" warning -- in fact, I thought I had done so. </p> <p> I've now disabled the warning only if BOOST_WORKAROUND(BOOST_MSVC, &gt;= 1400) (See <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1618#1618" title="#1618: Feature Requests: Warnings need supressing (closed: fixed)">#1618</a>). I'm assuming this works, and re-closing the ticket. </p> <p> Thanks for all your help, Richard. </p> Ticket