Boost C++ Libraries: Ticket #8850: Patch for spurious warning at boost/accumulators/statistics/p_square_quantile.hpp(72) https://svn.boost.org/trac10/ticket/8850 <p> When building with Visual Studio 2012 (msvc-11.0), 64-bit, I got a <strong>27 kB</strong> warning message at the head of which was: </p> <pre class="wiki">boost/accumulators/statistics/p_square_quantile.hpp(72): warning C4244: '=' : conversion from 'size_t' to 'double', possible loss of data </pre><p> The offending line 72 and a possible one-character patch would seem to be: </p> <pre class="wiki">- this-&gt;actual_positions[i] = i + 1; + this-&gt;actual_positions[i] = i + 1.; </pre><p> A code snippet that demonstrates the warning: </p> <pre class="wiki">#include &lt;boost/accumulators/accumulators.hpp&gt; #include &lt;boost/accumulators/statistics/stats.hpp&gt; #include &lt;boost/accumulators/statistics/median.hpp&gt; boost::accumulators::accumulator_set&lt; double, boost::accumulators::stats&lt; boost::accumulators::tag::median &gt; &gt; median_accumulator; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8850 Trac 1.4.3 Eric Niebler Tue, 23 Jul 2013 04:56:22 GMT <link>https://svn.boost.org/trac10/ticket/8850#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8850#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85122" title="fix msvc warning, refs #8850">[85122]</a>) fix msvc warning, refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8850" title="#8850: Patches: Patch for spurious warning at ... (closed: fixed)">#8850</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Tue, 23 Jul 2013 04:57:34 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/8850#comment:2 https://svn.boost.org/trac10/ticket/8850#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Fixed on trunk, will close when merged to release. Thanks. </p> Ticket Eric Niebler Thu, 22 Aug 2013 19:39:57 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8850#comment:3 https://svn.boost.org/trac10/ticket/8850#comment:3 <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> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85424" title="merge [85122],[85123],[85124] from trunk to release; fixes #7915, ...">[85424]</a>) merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/85122" title="fix msvc warning, refs #8850">[85122]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/85123" title="silly typos, refs #7915">[85123]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/85124" title="rename average to fdiv, refs #8262">[85124]</a> from trunk to release; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7915" title="#7915: Patches: Minor doc typo in libs/accumulators/doc/accumulators.qbk (closed: fixed)">#7915</a>, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8850" title="#8850: Patches: Patch for spurious warning at ... (closed: fixed)">#8850</a>, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8262" title="#8262: Bugs: numeric::average gives incorrect result (closed: fixed)">#8262</a> </p> Ticket