[vtk-developers] [VTK 0014013]: Silence alignment change cast in vtkImageReader.cxx
Mantis Bug Tracker
mantis at public.kitware.com
Tue Apr 16 16:49:44 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://vtk.org/Bug/view.php?id=14013
======================================================================
Reported By: kentwilliams
Assigned To:
======================================================================
Project: VTK
Issue ID: 14013
Category: (No Category)
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: backlog
Project: TBD
Type: usability
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 2013-04-16 16:49 EDT
Last Modified: 2013-04-16 16:49 EDT
======================================================================
Summary: Silence alignment change cast in vtkImageReader.cxx
Description:
Run into this with our 'paranoid' build flags and CLang. Git version
86d156256c76a98
CLang complains about line 324 in vtkImageReader.cxx
Not a real problem because the templating should mean that casting to a wider
type is actually a good cast. The patch below makes the warning go away, though
there might be a more elegant solution:
diff --git a/IO/Image/vtkImageReader.cxx b/IO/Image/vtkImageReader.cxx
index 1125fee..eaccc09 100644
--- a/IO/Image/vtkImageReader.cxx
+++ b/IO/Image/vtkImageReader.cxx
@@ -321,7 +321,7 @@ void vtkImageReaderUpdate2(vtkImageReader *self,
vtkImageData *data,
}
// copy the bytes into the typed data
- inPtr = (IT *)(buf);
+ inPtr = (IT *)(void *)(buf);
for (idx0 = dataExtent[0]; idx0 <= dataExtent[1]; ++idx0)
{
// Copy pixel into the output.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-04-16 16:49 kentwilliams New Issue
======================================================================
More information about the vtk-developers
mailing list