<div dir="ltr"><div>I did put a patch on gerrit:<br><a href="http://review.source.kitware.com/#/c/11312/">http://review.source.kitware.com/#/c/11312/</a><br><br></div>but your &#39;\xFF&#39; might work.<br><br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, May 19, 2013 at 10:11 AM, Bradley Lowekamp <span dir="ltr">&lt;<a href="mailto:brad@lowekamp.net" target="_blank">brad@lowekamp.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto"><div>I was thinking about trying &#39;\xFF&#39;.  I&#39;ll try on my rh6 system to see if either of these options stop the warning. </div><div><div class="h5"><div><br></div><div><br></div><div><br>On May 19, 2013, at 8:31 AM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt; wrote:<br>
<br></div><blockquote type="cite"><div><div dir="ltr">That did not work either.  My bad.<div><br></div><div>Should it not be</div><div><span style="font-size:13px;font-family:arial,sans-serif">const unsigned char  buffer[3] = { 255, 255, 254};</span><br>

</div><div><span style="font-size:13px;font-family:arial,sans-serif">or</span></div><div><span style="font-size:13px;font-family:arial,sans-serif">const char  buffer[3] = { -1, -1, -2};</span><span style="font-size:13px;font-family:arial,sans-serif"><br>

</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 18, 2013 at 3:11 PM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Try int&#39;s. See:<br><a href="http://www.stroustrup.com/C++11FAQ.html#narrowing" target="_blank">http://www.stroustrup.com/C++11FAQ.html#narrowing</a><br>

<br>const char  buffer[3] = { 255, 255, 254};<br><br></div><div class="gmail_extra"><div><div>
<br><br><div class="gmail_quote">On Sat, May 18, 2013 at 1:09 PM, Bradley Lowekamp <span dir="ltr">&lt;<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hello,<br>
<br>
I pushed some code yesterday and it&#39;s causing a couple problem. It seems simple enough. Whats the best way to express this?<br>
<br>
   // MAGIC_NUMBER = 16777214 ( little endian )<br>
   const char  buffer[3] = { 0xFF, 0xFF, 0xFE};<br>
<br>
<br>
ERROR:<br>
/Users/builder/external/ITK/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx:311:31: error: constant expression evaluates to 255 which cannot be narrowed to type &#39;char&#39; [-Wc++11-narrowing]<br>
   const char  buffer[3] = { 0xFF, 0xFF, 0xFE};<br>
                             ^~~~<br>
/Users/builder/external/ITK/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx:311:31: note: override this message by inserting an explicit cast<br>
   const char  buffer[3] = { 0xFF, 0xFF, 0xFE};<br>
                             ^~~~<br>
                             static_cast&lt;char&gt;( )<br>
<br>
<br>
WARNING:<br>
<br>
var/lib/jenkins/jobs/ITK-v4-Testing-32-chroot/workspace/MyTests/ITK/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx: In member function &#39;virtual void itk::FreeSurferBinaryMeshIO::WriteMeshInformation()&#39;:<br>
/var/lib/jenkins/jobs/ITK-v4-Testing-32-chroot/workspace/MyTests/ITK/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx:311:47: warning: narrowing conversion of &#39;255&#39; from &#39;int&#39; to &#39;const char&#39; inside { } is ill-formed in C++11 [-Wnarrowing]<br>



<br>
<br>
Thanks for your suggestion.<br>
<br>
Brad<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
</blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div></blockquote></div></div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>