Boost C++ Libraries: Ticket #12360: dead code detected by coverity in mersenne_twister https://svn.boost.org/trac10/ticket/12360 <p> This is from boost 1.54 - it would be wise to re-test this on the development trunk to ensure it is still there before resolving it. This would be considered a trivial performance optimization by removing a branch. </p> <pre class="wiki"> { assignment: Assigning: j = 623UL. const: At condition j &lt; 623UL, the value of j must be equal to 623. dead_error_condition: The condition j &lt; 623UL cannot be true. 430 for(std::size_t j = n-1-unroll_extra2; j &lt; n-1; j++) { CID 10152 (#1 of 1): Logically dead code (DEADCODE)dead_error_begin: Execution cannot reach this statement: y = (this-&gt;x[j] &amp; 0x8000000.... 431 UIntType y = (x[j] &amp; upper_mask) | (x[j+1] &amp; lower_mask); 432 x[j] = x[j-(n-m)] ^ (y &gt;&gt; 1) ^ ((x[j+1]&amp;1) * a); 433 } 434 } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12360 Trac 1.4.3 Marshall Clow Thu, 04 May 2017 01:05:47 GMT <link>https://svn.boost.org/trac10/ticket/12360#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12360#comment:1</guid> <description> <p> I don't think there's enough information here to make a change. Can you tell me what the caller, etc was doing? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 04 May 2017 01:32:40 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12360#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12360#comment:2</guid> <description> <p> This definitely is a spurious warning. The code in question may or may not be dead depending on the template parameters. </p> </description> <category>Ticket</category> </item> <item> <author>jim.king@…</author> <pubDate>Thu, 04 May 2017 04:00:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12360#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12360#comment:3</guid> <description> <p> If you want to close it out that's fine. I just checked and found that boost is not covered in Coverity Scan. I think it would be really useful, especially given each boost project is separate in github, to have a Coverity Scan project covering each boost project. It is a useful tool that finds problems, and you can never have enough quality controls on software. </p> </description> <category>Ticket</category> </item> </channel> </rss>