Hello,
I pushed some code yesterday and it's causing a couple problem. It seems simple
enough. Whats the best way to express this?
// MAGIC_NUMBER = 16777214 ( little endian )
const char buffer[3] = { 0xFF, 0xFF, 0xFE};
ERROR:
/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]
const char buffer[3] = { 0xFF, 0xFF, 0xFE};
^~~~
/Users/builder/external/ITK/Modules/IO/Mesh/src/itkFreeSurferBinaryMeshIO.cxx:311:31:
note: override this message by inserting an explicit cast
const char buffer[3] = { 0xFF, 0xFF, 0xFE};
^~~~
static_cast<char>( )
WARNING:
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()':
/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]
Thanks for your suggestion.
Brad
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers