help with cppcheck duplInheritedMember warnings

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

help with cppcheck duplInheritedMember warnings

Sean McBride
Hi all,

I've deliberately un-suppressed cppcheck's duplInheritedMember warning and now we have 24 warnings here:

<https://open.cdash.org/viewBuildError.php?type=1&buildid=4730716>

The warning is telling us that various classes have ivars with the same name as an ivar in their superclass. This is a pretty bad code smell IMNSHO.

But it takes someone who knows the classes well to decide on the best fix...

The warnings are:

Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.

Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.

Common/DataModel/vtkPlanes.h:129: warning: The class 'vtkPlanesIntersection' defines member variable with name 'Plane' also defined in its parent class 'vtkPlanes'.

Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class 'vtkSimpleCellTessellator' defines member variable with name 'DataSet' also defined in its parent class 'vtkGenericCellTessellator'.

Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning: The class 'vtkCompositeDataPipeline' defines member variable with name 'UpdateExtentRequest' also defined in its parent class 'vtkStreamingDemandDrivenPipeline'.

Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h:211: warning: The class 'vtkCompositeInterpolatedVelocityField' defines member variable with name 'TOLERANCE_SCALE' also defined in its parent class 'vtkAbstractInterpolatedVelocityField'.
 
IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class 'vtkTableToSQLiteWriter' defines member variable with name 'Input' also defined in its parent class 'vtkTableToDatabaseWriter'.

Imaging/Core/vtkImageReslice.h:510: warning: The class 'vtkImageResample' defines member variable with name 'OutputSpacing' also defined in its parent class 'vtkImageReslice'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'Modifier' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:233: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P1World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:234: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P2World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:235: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P3World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:236: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P4World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:237: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P21World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:238: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P43World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:239: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'T21' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:240: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'T43' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:241: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'CenterWorld' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:242: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'StartEventPositionWorld' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Rendering/Core/vtkColorTransferFunction.h:398: warning: The class 'vtkDiscretizableColorTransferFunction' defines member variable with name 'BuildTime' also defined in its parent class 'vtkColorTransferFunction'.

Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class 'vtkHardwareSelectionPolyDataPainter' defines member variable with name 'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.

Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class 'vtkXRenderWindowTclInteractor' defines member variable with name 'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.

Views/Infovis/vtkRenderView.h:289: warning: The class 'vtkGraphLayoutView' defines member variable with name 'Interacting' also defined in its parent class 'vtkRenderView'.

Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class 'vtkRenderedTreeAreaRepresentation' defines member variable with name 'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Andy Bauer
Hi Sean,

Thanks for looking at this. I'll take a look at Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h.

Best,
Andy

On Thu, Jan 19, 2017 at 10:13 PM, Sean McBride <[hidden email]> wrote:
Hi all,

I've deliberately un-suppressed cppcheck's duplInheritedMember warning and now we have 24 warnings here:

<https://open.cdash.org/viewBuildError.php?type=1&buildid=4730716>

The warning is telling us that various classes have ivars with the same name as an ivar in their superclass. This is a pretty bad code smell IMNSHO.

But it takes someone who knows the classes well to decide on the best fix...

The warnings are:

Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.

Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.

Common/DataModel/vtkPlanes.h:129: warning: The class 'vtkPlanesIntersection' defines member variable with name 'Plane' also defined in its parent class 'vtkPlanes'.

Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class 'vtkSimpleCellTessellator' defines member variable with name 'DataSet' also defined in its parent class 'vtkGenericCellTessellator'.

Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning: The class 'vtkCompositeDataPipeline' defines member variable with name 'UpdateExtentRequest' also defined in its parent class 'vtkStreamingDemandDrivenPipeline'.

Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h:211: warning: The class 'vtkCompositeInterpolatedVelocityField' defines member variable with name 'TOLERANCE_SCALE' also defined in its parent class 'vtkAbstractInterpolatedVelocityField'.

IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class 'vtkTableToSQLiteWriter' defines member variable with name 'Input' also defined in its parent class 'vtkTableToDatabaseWriter'.

Imaging/Core/vtkImageReslice.h:510: warning: The class 'vtkImageResample' defines member variable with name 'OutputSpacing' also defined in its parent class 'vtkImageReslice'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'Modifier' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:233: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P1World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:234: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P2World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:235: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P3World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:236: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P4World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:237: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P21World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:238: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P43World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:239: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'T21' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:240: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'T43' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:241: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'CenterWorld' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:242: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'StartEventPositionWorld' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Rendering/Core/vtkColorTransferFunction.h:398: warning: The class 'vtkDiscretizableColorTransferFunction' defines member variable with name 'BuildTime' also defined in its parent class 'vtkColorTransferFunction'.

Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class 'vtkHardwareSelectionPolyDataPainter' defines member variable with name 'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.

Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class 'vtkXRenderWindowTclInteractor' defines member variable with name 'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.

Views/Infovis/vtkRenderView.h:289: warning: The class 'vtkGraphLayoutView' defines member variable with name 'Interacting' also defined in its parent class 'vtkRenderView'.

Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class 'vtkRenderedTreeAreaRepresentation' defines member variable with name 'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Andy Bauer
Ha, mine was easy! A static const member variable with identical values :)

MR at https://gitlab.kitware.com/vtk/vtk/merge_requests/2407.

On Fri, Jan 20, 2017 at 10:21 AM, Andy Bauer <[hidden email]> wrote:
Hi Sean,

Thanks for looking at this. I'll take a look at Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h.

Best,
Andy

On Thu, Jan 19, 2017 at 10:13 PM, Sean McBride <[hidden email]> wrote:
Hi all,

I've deliberately un-suppressed cppcheck's duplInheritedMember warning and now we have 24 warnings here:

<https://open.cdash.org/viewBuildError.php?type=1&buildid=4730716>

The warning is telling us that various classes have ivars with the same name as an ivar in their superclass. This is a pretty bad code smell IMNSHO.

But it takes someone who knows the classes well to decide on the best fix...

The warnings are:

Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.

Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.

Common/DataModel/vtkPlanes.h:129: warning: The class 'vtkPlanesIntersection' defines member variable with name 'Plane' also defined in its parent class 'vtkPlanes'.

Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class 'vtkSimpleCellTessellator' defines member variable with name 'DataSet' also defined in its parent class 'vtkGenericCellTessellator'.

Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning: The class 'vtkCompositeDataPipeline' defines member variable with name 'UpdateExtentRequest' also defined in its parent class 'vtkStreamingDemandDrivenPipeline'.

Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h:211: warning: The class 'vtkCompositeInterpolatedVelocityField' defines member variable with name 'TOLERANCE_SCALE' also defined in its parent class 'vtkAbstractInterpolatedVelocityField'.

IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class 'vtkTableToSQLiteWriter' defines member variable with name 'Input' also defined in its parent class 'vtkTableToDatabaseWriter'.

Imaging/Core/vtkImageReslice.h:510: warning: The class 'vtkImageResample' defines member variable with name 'OutputSpacing' also defined in its parent class 'vtkImageReslice'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'Modifier' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:233: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P1World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:234: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P2World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:235: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P3World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:236: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P4World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:237: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P21World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:238: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P43World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:239: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'T21' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:240: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'T43' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:241: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'CenterWorld' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:242: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'StartEventPositionWorld' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Rendering/Core/vtkColorTransferFunction.h:398: warning: The class 'vtkDiscretizableColorTransferFunction' defines member variable with name 'BuildTime' also defined in its parent class 'vtkColorTransferFunction'.

Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class 'vtkHardwareSelectionPolyDataPainter' defines member variable with name 'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.

Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class 'vtkXRenderWindowTclInteractor' defines member variable with name 'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.

Views/Infovis/vtkRenderView.h:289: warning: The class 'vtkGraphLayoutView' defines member variable with name 'Interacting' also defined in its parent class 'vtkRenderView'.

Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class 'vtkRenderedTreeAreaRepresentation' defines member variable with name 'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

David Gobbi
I've fixed the dupes in vtkPlanesIntersection and vtkImageResample.  The latter was nasty.

 - David


On Fri, Jan 20, 2017 at 8:35 AM, Andy Bauer <[hidden email]> wrote:
Ha, mine was easy! A static const member variable with identical values :)

MR at https://gitlab.kitware.com/vtk/vtk/merge_requests/2407.

On Fri, Jan 20, 2017 at 10:21 AM, Andy Bauer <[hidden email]> wrote:
Hi Sean,

Thanks for looking at this. I'll take a look at Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h.

Best,
Andy

On Thu, Jan 19, 2017 at 10:13 PM, Sean McBride <[hidden email]> wrote:
Hi all,

I've deliberately un-suppressed cppcheck's duplInheritedMember warning and now we have 24 warnings here:

<https://open.cdash.org/viewBuildError.php?type=1&buildid=4730716>

The warning is telling us that various classes have ivars with the same name as an ivar in their superclass. This is a pretty bad code smell IMNSHO.

But it takes someone who knows the classes well to decide on the best fix...

The warnings are:

Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.

Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.

Common/DataModel/vtkPlanes.h:129: warning: The class 'vtkPlanesIntersection' defines member variable with name 'Plane' also defined in its parent class 'vtkPlanes'.

Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class 'vtkSimpleCellTessellator' defines member variable with name 'DataSet' also defined in its parent class 'vtkGenericCellTessellator'.

Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning: The class 'vtkCompositeDataPipeline' defines member variable with name 'UpdateExtentRequest' also defined in its parent class 'vtkStreamingDemandDrivenPipeline'.

Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h:211: warning: The class 'vtkCompositeInterpolatedVelocityField' defines member variable with name 'TOLERANCE_SCALE' also defined in its parent class 'vtkAbstractInterpolatedVelocityField'.

IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class 'vtkTableToSQLiteWriter' defines member variable with name 'Input' also defined in its parent class 'vtkTableToDatabaseWriter'.

Imaging/Core/vtkImageReslice.h:510: warning: The class 'vtkImageResample' defines member variable with name 'OutputSpacing' also defined in its parent class 'vtkImageReslice'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'Modifier' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:233: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P1World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:234: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P2World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:235: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P3World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:236: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P4World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:237: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P21World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:238: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'P43World' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:239: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'T21' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:240: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'T43' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:241: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'CenterWorld' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:242: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'StartEventPositionWorld' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Rendering/Core/vtkColorTransferFunction.h:398: warning: The class 'vtkDiscretizableColorTransferFunction' defines member variable with name 'BuildTime' also defined in its parent class 'vtkColorTransferFunction'.

Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class 'vtkHardwareSelectionPolyDataPainter' defines member variable with name 'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.

Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class 'vtkXRenderWindowTclInteractor' defines member variable with name 'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.

Views/Infovis/vtkRenderView.h:289: warning: The class 'vtkGraphLayoutView' defines member variable with name 'Interacting' also defined in its parent class 'vtkRenderView'.

Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class 'vtkRenderedTreeAreaRepresentation' defines member variable with name 'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Sean McBride
In reply to this post by Sean McBride
There are about 20 of these left... does anyone want to tackle them or shall I suppress them all?  (Their presence, I believe, is making people miss other new warnings that cppcheck is finding.)

Cheers,

Sean


On Thu, 19 Jan 2017 22:13:24 -0500, Sean McBride said:

>Hi all,
>
>I've deliberately un-suppressed cppcheck's duplInheritedMember warning
>and now we have 24 warnings here:
>
><https://open.cdash.org/viewBuildError.php?type=1&buildid=4730716>
>
>The warning is telling us that various classes have ivars with the same
>name as an ivar in their superclass. This is a pretty bad code smell IMNSHO.
>
>But it takes someone who knows the classes well to decide on the best fix...
>
>The warnings are:
>
>Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines
>member variable with name 'Colors' also defined in its parent class
>'vtkPlot3D'.
>
>Charts/Core/vtkChartMatrix.h:155: warning: The class
>'vtkScatterPlotMatrix' defines member variable with name 'Private' also
>defined in its parent class 'vtkChartMatrix'.
>
>Common/DataModel/vtkPlanes.h:129: warning: The class
>'vtkPlanesIntersection' defines member variable with name 'Plane' also
>defined in its parent class 'vtkPlanes'.
>
>Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class
>'vtkSimpleCellTessellator' defines member variable with name 'DataSet'
>also defined in its parent class 'vtkGenericCellTessellator'.
>
>Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning:
>The class 'vtkCompositeDataPipeline' defines member variable with name
>'UpdateExtentRequest' also defined in its parent class
>'vtkStreamingDemandDrivenPipeline'.
>
>Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h:211: warning:
>The class 'vtkCompositeInterpolatedVelocityField' defines member
>variable with name 'TOLERANCE_SCALE' also defined in its parent class
>'vtkAbstractInterpolatedVelocityField'.
>
>IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class
>'vtkTableToSQLiteWriter' defines member variable with name 'Input' also
>defined in its parent class 'vtkTableToDatabaseWriter'.
>
>Imaging/Core/vtkImageReslice.h:510: warning: The class
>'vtkImageResample' defines member variable with name 'OutputSpacing'
>also defined in its parent class 'vtkImageReslice'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'Modifier' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:233: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P1World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:234: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P2World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:235: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P3World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:236: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P4World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:237: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P21World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:238: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P43World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:239: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'T21' also defined in its parent class 'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:240: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'T43' also defined in its parent class 'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:241: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'CenterWorld' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:242: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'StartEventPositionWorld' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Rendering/Core/vtkColorTransferFunction.h:398: warning: The class
>'vtkDiscretizableColorTransferFunction' defines member variable with
>name 'BuildTime' also defined in its parent class 'vtkColorTransferFunction'.
>
>Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class
>'vtkHardwareSelectionPolyDataPainter' defines member variable with name
>'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.
>
>Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class
>'vtkXRenderWindowTclInteractor' defines member variable with name
>'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.
>
>Views/Infovis/vtkRenderView.h:289: warning: The class
>'vtkGraphLayoutView' defines member variable with name 'Interacting'
>also defined in its parent class 'vtkRenderView'.
>
>Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class
>'vtkRenderedTreeAreaRepresentation' defines member variable with name
>'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Jon Haitz Legarreta
I will give the warnings in vtkBiDimensionalRepresentation2D a try.

JON HAITZ


--


On 3 May 2017 at 17:06, Sean McBride <[hidden email]> wrote:
There are about 20 of these left... does anyone want to tackle them or shall I suppress them all?  (Their presence, I believe, is making people miss other new warnings that cppcheck is finding.)

Cheers,

Sean


On Thu, 19 Jan 2017 22:13:24 -0500, Sean McBride said:

>Hi all,
>
>I've deliberately un-suppressed cppcheck's duplInheritedMember warning
>and now we have 24 warnings here:
>
><https://open.cdash.org/viewBuildError.php?type=1&buildid=4730716>
>
>The warning is telling us that various classes have ivars with the same
>name as an ivar in their superclass. This is a pretty bad code smell IMNSHO.
>
>But it takes someone who knows the classes well to decide on the best fix...
>
>The warnings are:
>
>Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines
>member variable with name 'Colors' also defined in its parent class
>'vtkPlot3D'.
>
>Charts/Core/vtkChartMatrix.h:155: warning: The class
>'vtkScatterPlotMatrix' defines member variable with name 'Private' also
>defined in its parent class 'vtkChartMatrix'.
>
>Common/DataModel/vtkPlanes.h:129: warning: The class
>'vtkPlanesIntersection' defines member variable with name 'Plane' also
>defined in its parent class 'vtkPlanes'.
>
>Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class
>'vtkSimpleCellTessellator' defines member variable with name 'DataSet'
>also defined in its parent class 'vtkGenericCellTessellator'.
>
>Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning:
>The class 'vtkCompositeDataPipeline' defines member variable with name
>'UpdateExtentRequest' also defined in its parent class
>'vtkStreamingDemandDrivenPipeline'.
>
>Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h:211: warning:
>The class 'vtkCompositeInterpolatedVelocityField' defines member
>variable with name 'TOLERANCE_SCALE' also defined in its parent class
>'vtkAbstractInterpolatedVelocityField'.
>
>IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class
>'vtkTableToSQLiteWriter' defines member variable with name 'Input' also
>defined in its parent class 'vtkTableToDatabaseWriter'.
>
>Imaging/Core/vtkImageReslice.h:510: warning: The class
>'vtkImageResample' defines member variable with name 'OutputSpacing'
>also defined in its parent class 'vtkImageReslice'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'Modifier' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:233: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P1World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:234: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P2World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:235: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P3World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:236: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P4World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:237: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P21World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:238: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P43World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:239: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'T21' also defined in its parent class 'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:240: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'T43' also defined in its parent class 'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:241: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'CenterWorld' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:242: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'StartEventPositionWorld' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Rendering/Core/vtkColorTransferFunction.h:398: warning: The class
>'vtkDiscretizableColorTransferFunction' defines member variable with
>name 'BuildTime' also defined in its parent class 'vtkColorTransferFunction'.
>
>Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class
>'vtkHardwareSelectionPolyDataPainter' defines member variable with name
>'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.
>
>Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class
>'vtkXRenderWindowTclInteractor' defines member variable with name
>'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.
>
>Views/Infovis/vtkRenderView.h:289: warning: The class
>'vtkGraphLayoutView' defines member variable with name 'Interacting'
>also defined in its parent class 'vtkRenderView'.
>
>Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class
>'vtkRenderedTreeAreaRepresentation' defines member variable with name
>'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

David Gobbi
In reply to this post by Sean McBride
I don't think suppressing them is a good idea, redefined member variables are strongly indicative of real bugs.  I'll fix the trivial lex one, at least, and I'll take a glance at some of the others.

 - David

On Wed, May 3, 2017 at 9:06 AM, Sean McBride <[hidden email]> wrote:
There are about 20 of these left... does anyone want to tackle them or shall I suppress them all?  (Their presence, I believe, is making people miss other new warnings that cppcheck is finding.)

Cheers,

Sean


On Thu, 19 Jan 2017 22:13:24 -0500, Sean McBride said:

>Hi all,
>
>I've deliberately un-suppressed cppcheck's duplInheritedMember warning
>and now we have 24 warnings here:
>
><https://open.cdash.org/viewBuildError.php?type=1&buildid=4730716>
>
>The warning is telling us that various classes have ivars with the same
>name as an ivar in their superclass. This is a pretty bad code smell IMNSHO.
>
>But it takes someone who knows the classes well to decide on the best fix...
>
>The warnings are:
>
>Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines
>member variable with name 'Colors' also defined in its parent class
>'vtkPlot3D'.
>
>Charts/Core/vtkChartMatrix.h:155: warning: The class
>'vtkScatterPlotMatrix' defines member variable with name 'Private' also
>defined in its parent class 'vtkChartMatrix'.
>
>Common/DataModel/vtkPlanes.h:129: warning: The class
>'vtkPlanesIntersection' defines member variable with name 'Plane' also
>defined in its parent class 'vtkPlanes'.
>
>Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class
>'vtkSimpleCellTessellator' defines member variable with name 'DataSet'
>also defined in its parent class 'vtkGenericCellTessellator'.
>
>Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning:
>The class 'vtkCompositeDataPipeline' defines member variable with name
>'UpdateExtentRequest' also defined in its parent class
>'vtkStreamingDemandDrivenPipeline'.
>
>Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.h:211: warning:
>The class 'vtkCompositeInterpolatedVelocityField' defines member
>variable with name 'TOLERANCE_SCALE' also defined in its parent class
>'vtkAbstractInterpolatedVelocityField'.
>
>IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class
>'vtkTableToSQLiteWriter' defines member variable with name 'Input' also
>defined in its parent class 'vtkTableToDatabaseWriter'.
>
>Imaging/Core/vtkImageReslice.h:510: warning: The class
>'vtkImageResample' defines member variable with name 'OutputSpacing'
>also defined in its parent class 'vtkImageReslice'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'Modifier' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:233: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P1World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:234: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P2World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:235: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P3World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:236: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P4World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:237: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P21World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:238: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'P43World' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:239: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'T21' also defined in its parent class 'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:240: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'T43' also defined in its parent class 'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:241: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'CenterWorld' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Interaction/Widgets/vtkBiDimensionalRepresentation.h:242: warning: The
>class 'vtkBiDimensionalRepresentation2D' defines member variable with
>name 'StartEventPositionWorld' also defined in its parent class
>'vtkBiDimensionalRepresentation'.
>
>Rendering/Core/vtkColorTransferFunction.h:398: warning: The class
>'vtkDiscretizableColorTransferFunction' defines member variable with
>name 'BuildTime' also defined in its parent class 'vtkColorTransferFunction'.
>
>Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class
>'vtkHardwareSelectionPolyDataPainter' defines member variable with name
>'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.
>
>Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class
>'vtkXRenderWindowTclInteractor' defines member variable with name
>'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.
>
>Views/Infovis/vtkRenderView.h:289: warning: The class
>'vtkGraphLayoutView' defines member variable with name 'Interacting'
>also defined in its parent class 'vtkRenderView'.
>
>Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class
>'vtkRenderedTreeAreaRepresentation' defines member variable with name
>'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Sean McBride
On Wed, 3 May 2017 09:25:09 -0600, David Gobbi said:

>I don't think suppressing them is a good idea, redefined member variables
>are strongly indicative of real bugs.

Thanks David & Jon!  We are down to 10 now:

Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.

Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.

Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class 'vtkSimpleCellTessellator' defines member variable with name 'DataSet' also defined in its parent class 'vtkGenericCellTessellator'.

Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning: The class 'vtkCompositeDataPipeline' defines member variable with name 'UpdateExtentRequest' also defined in its parent class 'vtkStreamingDemandDrivenPipeline'.

IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class 'vtkTableToSQLiteWriter' defines member variable with name 'Input' also defined in its parent class 'vtkTableToDatabaseWriter'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'Modifier' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class 'vtkHardwareSelectionPolyDataPainter' defines member variable with name 'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.

Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class 'vtkXRenderWindowTclInteractor' defines member variable with name 'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.

Views/Infovis/vtkRenderView.h:289: warning: The class 'vtkGraphLayoutView' defines member variable with name 'Interacting' also defined in its parent class 'vtkRenderView'.

Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class 'vtkRenderedTreeAreaRepresentation' defines member variable with name 'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Jon Haitz Legarreta
You're welcome.

I'll adopt the vtkPlotSurface, vtkScatterPlotMatrix, and vtkBiDimensionalRepresentation2D (there was a member in this last that escaped my patch set) class issues.

JON HAITZ
--


On 5 May 2017 at 16:09, Sean McBride <[hidden email]> wrote:
On Wed, 3 May 2017 09:25:09 -0600, David Gobbi said:

>I don't think suppressing them is a good idea, redefined member variables
>are strongly indicative of real bugs.

Thanks David & Jon!  We are down to 10 now:

Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.

Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.

Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class 'vtkSimpleCellTessellator' defines member variable with name 'DataSet' also defined in its parent class 'vtkGenericCellTessellator'.

Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning: The class 'vtkCompositeDataPipeline' defines member variable with name 'UpdateExtentRequest' also defined in its parent class 'vtkStreamingDemandDrivenPipeline'.

IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class 'vtkTableToSQLiteWriter' defines member variable with name 'Input' also defined in its parent class 'vtkTableToDatabaseWriter'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'Modifier' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class 'vtkHardwareSelectionPolyDataPainter' defines member variable with name 'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.

Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class 'vtkXRenderWindowTclInteractor' defines member variable with name 'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.

Views/Infovis/vtkRenderView.h:289: warning: The class 'vtkGraphLayoutView' defines member variable with name 'Interacting' also defined in its parent class 'vtkRenderView'.

Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class 'vtkRenderedTreeAreaRepresentation' defines member variable with name 'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Jon Haitz Legarreta
The issue with the vtkScatterPlotMatrix class is interesting.

The ivar being reported as a duplicate is not, in fact, a duplicate: both the parent class vtkChartMatrix and the child vtkScatterPlotMatrix define an internal class named PIMPL. And the ivar "Private" is an instance of that class.

I was not aware of the use of private implementations that PIMPL represents within the VTK context.

Now, I could rename the child class' PIMPL class or its instance.

I'd like to have some advice on this. Renaming the parents' does not seem a better idea.

BTW, I'm interested in knowing about the (need of/convenience) PIMPL classes. Is the use of such PIMPL classes documented somewhere?

Thanks,
JON HAITZ

--


---------- Forwarded message ----------
From: Jon Haitz Legarreta <[hidden email]>
Date: 5 May 2017 at 16:30
Subject: Re: [vtk-developers] help with cppcheck duplInheritedMember warnings
To: Sean McBride <[hidden email]>
Cc: VTK Developers <[hidden email]>


You're welcome.

I'll adopt the vtkPlotSurface, vtkScatterPlotMatrix, and vtkBiDimensionalRepresentation2D (there was a member in this last that escaped my patch set) class issues.

JON HAITZ
--


On 5 May 2017 at 16:09, Sean McBride <[hidden email]> wrote:
On Wed, 3 May 2017 09:25:09 -0600, David Gobbi said:

>I don't think suppressing them is a good idea, redefined member variables
>are strongly indicative of real bugs.

Thanks David & Jon!  We are down to 10 now:

Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.

Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.

Common/DataModel/vtkGenericCellTessellator.h:211: warning: The class 'vtkSimpleCellTessellator' defines member variable with name 'DataSet' also defined in its parent class 'vtkGenericCellTessellator'.

Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.h:349: warning: The class 'vtkCompositeDataPipeline' defines member variable with name 'UpdateExtentRequest' also defined in its parent class 'vtkStreamingDemandDrivenPipeline'.

IO/SQL/vtkTableToDatabaseWriter.h:75: warning: The class 'vtkTableToSQLiteWriter' defines member variable with name 'Input' also defined in its parent class 'vtkTableToDatabaseWriter'.

Interaction/Widgets/vtkBiDimensionalRepresentation.h:213: warning: The class 'vtkBiDimensionalRepresentation2D' defines member variable with name 'Modifier' also defined in its parent class 'vtkBiDimensionalRepresentation'.

Rendering/OpenGL/vtkStandardPolyDataPainter.h:86: warning: The class 'vtkHardwareSelectionPolyDataPainter' defines member variable with name 'TotalCells' also defined in its parent class 'vtkStandardPolyDataPainter'.

Rendering/OpenGL/vtkXRenderWindowInteractor.h:198: warning: The class 'vtkXRenderWindowTclInteractor' defines member variable with name 'Internal' also defined in its parent class 'vtkXRenderWindowInteractor'.

Views/Infovis/vtkRenderView.h:289: warning: The class 'vtkGraphLayoutView' defines member variable with name 'Interacting' also defined in its parent class 'vtkRenderView'.

Views/Infovis/vtkRenderedRepresentation.h:96: warning: The class 'vtkRenderedTreeAreaRepresentation' defines member variable with name 'Implementation' also defined in its parent class 'vtkRenderedRepresentation'.



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers





_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Ben Boeckel
On Fri, May 05, 2017 at 18:31:53 +0200, Jon Haitz Legarreta wrote:
> The ivar being reported as a duplicate is not, in fact, a duplicate: both
> the parent class vtkChartMatrix and the child vtkScatterPlotMatrix define
> an internal class named PIMPL. And the ivar "Private" is an instance of
> that class.

vtkChartMatrix is doing PIMPL wrong. It is `protected`, not `private`. I
think that is likely the proper fix.

> I was not aware of the use of private implementations that PIMPL represents
> within the VTK context.

Usually, I've seen `<classname>Internal` instead declared outside of the
class itself, but these are usually `protected` so that subclasses can
use them. If `vtkChartMatrix::Private` has this intended use, it should
follow that pattern instead.

> BTW, I'm interested in knowing about the (need of/convenience) PIMPL
> classes. Is the use of such PIMPL classes documented somewhere?

In VTK? I don't think so. The idea is to hide the amount of data
necessary for completely internal data collection out of the header and
affecting `sizeof(class)` (an ABI break) or exposing too much (prone to
breaking API because users of the class rely on the wrong things). The
Wiki page is useful:

    https://en.wikipedia.org/wiki/Opaque_pointer

--Ben
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Jon Haitz Legarreta
Thanks for the explanation Ben.

The MR to fix it is under way.

Kind regards,
JON HAITZ


--


On 8 May 2017 at 14:48, Ben Boeckel <[hidden email]> wrote:
On Fri, May 05, 2017 at 18:31:53 +0200, Jon Haitz Legarreta wrote:
> The ivar being reported as a duplicate is not, in fact, a duplicate: both
> the parent class vtkChartMatrix and the child vtkScatterPlotMatrix define
> an internal class named PIMPL. And the ivar "Private" is an instance of
> that class.

vtkChartMatrix is doing PIMPL wrong. It is `protected`, not `private`. I
think that is likely the proper fix.

> I was not aware of the use of private implementations that PIMPL represents
> within the VTK context.

Usually, I've seen `<classname>Internal` instead declared outside of the
class itself, but these are usually `protected` so that subclasses can
use them. If `vtkChartMatrix::Private` has this intended use, it should
follow that pattern instead.

> BTW, I'm interested in knowing about the (need of/convenience) PIMPL
> classes. Is the use of such PIMPL classes documented somewhere?

In VTK? I don't think so. The idea is to hide the amount of data
necessary for completely internal data collection out of the header and
affecting `sizeof(class)` (an ABI break) or exposing too much (prone to
breaking API because users of the class rely on the wrong things). The
Wiki page is useful:

    https://en.wikipedia.org/wiki/Opaque_pointer

--Ben


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Marcus D. Hanwell-2
In reply to this post by Sean McBride
On Fri, May 5, 2017 at 10:09 AM, Sean McBride <[hidden email]> wrote:

>
> On Wed, 3 May 2017 09:25:09 -0600, David Gobbi said:
>
> >I don't think suppressing them is a good idea, redefined member variables
> >are strongly indicative of real bugs.
>
> Thanks David & Jon!  We are down to 10 now:
>
> Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.
>
> Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.
>
I missed your original email, I haven't always had time to monitor the
mailing list. Are both of these still open? I can take a look if so,
they should be pretty simple and I likely wrote them, if there are
others in charts I can take a look too.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Jon Haitz Legarreta
Hi Marcus,
thanks !

The issues with vtk::PlotSurface were addressed here:
https://gitlab.kitware.com/vtk/vtk/merge_requests/2787

Still pending some approval/review/suggestion, since the build errors seem unrelated to me.

The last bunch of warnings (including that one belonging to the vtk::vtkScatterPlotMatrix class) is addressed here:
https://gitlab.kitware.com/vtk/vtk/merge_requests/2799

I've got to review the errors in this last still. That's why I did not add any reviewers yet. But if they look immediate to you, suggestions are welcome.

JON HAITZ

--


On 9 May 2017 at 20:34, Marcus D. Hanwell <[hidden email]> wrote:
On Fri, May 5, 2017 at 10:09 AM, Sean McBride <[hidden email]> wrote:
>
> On Wed, 3 May 2017 09:25:09 -0600, David Gobbi said:
>
> >I don't think suppressing them is a good idea, redefined member variables
> >are strongly indicative of real bugs.
>
> Thanks David & Jon!  We are down to 10 now:
>
> Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.
>
> Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.
>
I missed your original email, I haven't always had time to monitor the
mailing list. Are both of these still open? I can take a look if so,
they should be pretty simple and I likely wrote them, if there are
others in charts I can take a look too.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: help with cppcheck duplInheritedMember warnings

Marcus D. Hanwell-2
Hi Jon,

The charts related changed look good to me, just added +2 for that piece for both. Thanks for fixing these up, it looks like there are some dashboard issues hopefully they can be cleared up (look unrelated to the charts changes to me).

Marcus

On Tue, May 9, 2017 at 5:21 PM, Jon Haitz Legarreta <[hidden email]> wrote:
Hi Marcus,
thanks !

The issues with vtk::PlotSurface were addressed here:
https://gitlab.kitware.com/vtk/vtk/merge_requests/2787

Still pending some approval/review/suggestion, since the build errors seem unrelated to me.

The last bunch of warnings (including that one belonging to the vtk::vtkScatterPlotMatrix class) is addressed here:
https://gitlab.kitware.com/vtk/vtk/merge_requests/2799

I've got to review the errors in this last still. That's why I did not add any reviewers yet. But if they look immediate to you, suggestions are welcome.

JON HAITZ

--


On 9 May 2017 at 20:34, Marcus D. Hanwell <[hidden email]> wrote:
On Fri, May 5, 2017 at 10:09 AM, Sean McBride <[hidden email]> wrote:
>
> On Wed, 3 May 2017 09:25:09 -0600, David Gobbi said:
>
> >I don't think suppressing them is a good idea, redefined member variables
> >are strongly indicative of real bugs.
>
> Thanks David & Jon!  We are down to 10 now:
>
> Charts/Core/vtkPlot3D.h:152: warning: The class 'vtkPlotSurface' defines member variable with name 'Colors' also defined in its parent class 'vtkPlot3D'.
>
> Charts/Core/vtkChartMatrix.h:155: warning: The class 'vtkScatterPlotMatrix' defines member variable with name 'Private' also defined in its parent class 'vtkChartMatrix'.
>
I missed your original email, I haven't always had time to monitor the
mailing list. Are both of these still open? I can take a look if so,
they should be pretty simple and I likely wrote them, if there are
others in charts I can take a look too.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers