[vtk-developers] Changes to VTK Wrapping generated code would quiet useless warnings

kent williams nkwmailinglists at gmail.com
Wed Sep 10 11:15:01 EDT 2008


I am not a VTK developer myself or I might try and track this down and
fix it. Anyway:

The VTK tcl wrapper uses casts to char * all over the places such that
our builds have a ton of warnings like this:

.../vtkKWMyRenderWidgetTcl.cxx:71: warning: cast from `const char*' to
`char*' discards qualifiers from pointer target type

Now I realize this happens because Tcl isn't const-correct, so there
are places where you know it's safe to pass Tcl a const char *.

But since we're in the world of C++, it would be great  if const_cast
was used instead of C-style cast.  This would tell the compiler to
STFU in those many cases where the Tcl API is being a stupidhead.

Since Dash and CDash both limit the number of warnings they report,
having extraneous warnings can push warnings we should care about off
of the dashboard, which is a bad thing.



More information about the vtk-developers mailing list