Boost C++ Libraries: Ticket #1495: Warnings could be suppressed in Boost.Test https://svn.boost.org/trac10/ticket/1495 <p> I get some warnings that I believe really are from Boost.Test and that I suspect are unhelpful. </p> <p> i:\trunk\boost/test/impl/unit_test_main.ipp(91) : warning C4310: cast truncates constant value </p> <p> at </p> <blockquote> <p> case SFK_SUBSTR: </p> <blockquote> <p> return name.find( m_value ) != const_string::npos; </p> </blockquote> </blockquote> <p> Or is this telling me something about my test values? </p> <p> i:\trunk\boost\test\impl\debug.ipp(908) : warning C4702: unreachable code i:\trunk\boost\test\impl\debug.ipp(909) : warning C4702: unreachable code i:\trunk\boost\test\impl\debug.ipp(911) : warning C4702: unreachable code </p> <p> I added to detail/ suppress_warnings.hpp </p> <p> # pragma warning(disable: 4310) <em> cast truncates constant value # pragma warning(disable: 4702) </em> unreachable code </p> <p> and they go away ;-) </p> <p> If you agree with this, they could usefully be added? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1495 Trac 1.4.3 Gennadiy Rozental Mon, 21 Jan 2008 17:34:24 GMT <link>https://svn.boost.org/trac10/ticket/1495#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1495#comment:1</guid> <description> <ol><li>what is being cast to/from? </li></ol><ol start="2"><li>what compiler are u using? Why is it unreachable? </li></ol> </description> <category>Ticket</category> </item> <item> <dc:creator>Gennadiy Rozental</dc:creator> <pubDate>Mon, 07 Jul 2008 02:27:34 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1495#comment:2 https://svn.boost.org/trac10/ticket/1495#comment:2 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/47156" title="Suppress some warnings. Fixes #1495">[47156]</a>) Suppress some warnings. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1495" title="#1495: Feature Requests: Warnings could be suppressed in Boost.Test (closed: fixed)">#1495</a> </p> Ticket