[vtkusers] VTK Warnings

Kent Vander Velden graphix at iastate.edu
Fri Sep 8 22:48:11 EDT 2000


  Using gcc 2.95.2 with VTK 3.1.2 with warnings enabled it becomes
really difficult to sort out the warnings in the user program from
those in VTK.  This is because each class in VTK has an empty copy
constructor that does not initialization.  Do these empty bodies even
need to exist?  They don't with gcc 2.95.2 but I am not sure about
other compilers.  They should never be used so there should be no need
to have their bodies.  Perhaps an alternative to the short cut of
placing this blank body in the header would be to put it in the source
file.  Then, users of VTK would not see the warnings and the constructor
is still defined.

  Here is an example of what I see _pages_ and _pages_ of:

/usr/local/include/VTK/vtkCoordinate.h: In method `vtkCoordinate::vtkCoordinate(const vtkCoordinate &)':
/usr/local/include/VTK/vtkCoordinate.h:150: warning: base class `class vtkObject' should be explicitly initialized in the copy constructor
In file included from /usr/local/include/VTK/vtkActor2D.h:58,
                 from /usr/local/include/VTK/vtkRenderer.h:65,
                 from vtkandqt/src/renderwindow.h:10,
                 from vtkandqt/src/moc_renderwindow.cpp:17:
/usr/local/include/VTK/vtkProperty2D.h: In method `vtkProperty2D::vtkProperty2D(const vtkProperty2D &)':
/usr/local/include/VTK/vtkProperty2D.h:117: warning: base class `class vtkObject' should be explicitly initialized in the copy constructor
In file included from /usr/local/include/VTK/vtkRenderer.h:65,
                 from vtkandqt/src/renderwindow.h:10,
                 from vtkandqt/src/moc_renderwindow.cpp:17:
/usr/local/include/VTK/vtkActor2D.h: In method `vtkActor2D::vtkActor2D(const vtkActor2D &)':
/usr/local/include/VTK/vtkActor2D.h:126: warning: base class `class vtkProp' should be explicitly initialized in the copy constructor
In file included from /usr/local/include/VTK/vtkViewport.h:61,
                 from /usr/local/include/VTK/vtkRenderer.h:66,
                 from vtkandqt/src/renderwindow.h:10,
                 from vtkandqt/src/moc_renderwindow.cpp:17:
/usr/local/include/VTK/vtkActor2DCollection.h: In method `vtkActor2DCollection::vtkActor2DCollection(const vtkActor2DCollection &)':
/usr/local/include/VTK/vtkActor2DCollection.h:101: warning: base class `class vtkPropCollection' should be explicitly initialized in the copy constructor
In file included from /usr/local/include/VTK/vtkRenderer.h:66,
                 from vtkandqt/src/renderwindow.h:10,
                 from vtkandqt/src/moc_renderwindow.cpp:17:
/usr/local/include/VTK/vtkViewport.h: In method `vtkViewport::vtkViewport(const vtkViewport &)':
/usr/local/include/VTK/vtkViewport.h:249: warning: base class `class vtkObject' should be explicitly initialized in the copy constructor
In file included from vtkandqt/src/renderwindow.h:10,
                 from vtkandqt/src/moc_renderwindow.cpp:17:
/usr/local/include/VTK/vtkRenderer.h: In method `vtkRenderer::vtkRenderer(const vtkRenderer &)':
/usr/local/include/VTK/vtkRenderer.h:295: warning: base class `class vtkViewport' should be explicitly initialized in the copy constructor
In file included from /usr/local/include/VTK/vtkRenderWindow.h:60,
                 from vtkandqt/src/renderwindow.h:11,
                 from vtkandqt/src/moc_renderwindow.cpp:17:
/usr/local/include/VTK/vtkWindow.h: In method `vtkWindow::vtkWindow(const vtkWindow &)':
/usr/local/include/VTK/vtkWindow.h:153: warning: base class `class vtkObject' should be explicitly initialized in the copy constructor
In file included from /usr/local/include/VTK/vtkRenderWindow.h:61,
                 from vtkandqt/src/renderwindow.h:11,
                 from vtkandqt/src/moc_renderwindow.cpp:17:


---
Kent Vander Velden
kent at iastate.edu





More information about the vtkusers mailing list