<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 '\xFF' 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"><<a href="mailto:brad@lowekamp.net" target="_blank">brad@lowekamp.net</a>></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 '\xFF'. I'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 <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>> 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"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></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'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"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></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'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 'char' [-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<char>( )<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 'virtual void itk::FreeSurferBinaryMeshIO::WriteMeshInformation()':<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 '255' from 'int' to 'const char' 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>