From 6451a54388cb2ce06ae89d427169e3c37522c68e Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 31 May 2014 07:59:26 -0500 Subject: [PATCH] COMP: C++11 identified type missmatches rtkHisImageIO.cxx:149:53: error: constant expression evaluates to 134 which cannot be narrowed to type 'char' [-Wc++11-narrowing] --- common/rtkHisImageIO.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/rtkHisImageIO.cxx b/common/rtkHisImageIO.cxx index 6f9aa22..04a6e46 100644 --- a/common/rtkHisImageIO.cxx +++ b/common/rtkHisImageIO.cxx @@ -143,7 +143,7 @@ void rtk::HisImageIO::Write(const void* buffer) itkGenericExceptionMacro(<< "Could not open file (for writing): " << m_FileName); m_HeaderSize = HEADER_INFO_SIZE + 32; - char szHeader[HEADER_INFO_SIZE + 32] = { + unsigned char szHeader[HEADER_INFO_SIZE + 32] = { 0x00, 0x70, 0x44, 0x00, 0x64, 0x00, 0x64, 0x00, 0x20, 0x00, 0x20, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x18, 0x41, 0x04, 0x00, 0x40, 0x5F, 0x48, 0x01, 0x40, 0x00, 0x86, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, @@ -187,7 +187,7 @@ void rtk::HisImageIO::Write(const void* buffer) break; } - file.write(szHeader, m_HeaderSize); + file.write((const char *)szHeader, m_HeaderSize); file.write( (const char *)buffer, GetImageSizeInBytes() ); file.close(); } //// -- 2.47.1