DGtal-team / DGtal

Digital Geometry Tools and Algorithm Library
https://dgtal.org
GNU Lesser General Public License v3.0
370 stars 115 forks source link

Cleanups of examples from unused and shadowed variables #866

Closed copyme closed 9 years ago

copyme commented 10 years ago

Examples should be clear as much as possible.

dcoeurjo commented 10 years ago

If you compile with the cmake variable WARNING_AS_ERROR to true (default is false), all warnings (unused, shadow, ..) will be reported as error. In travis, such mode is enabled, so examples should be free of such warnings (except if they have weird dependencies)

Would you have an example ?

copyme commented 10 years ago

Some examples:

DGtal/examples/topology/homotopicThinning3D.cpp:107:25: warning: declaration of ‘it’ shadows a previous local [-Wshadow] DigitalSet::Iterator it = Q.front() DGtal/examples/topology/homotopicThinning3D.cpp:81:24: warning: shadowed declaration is here [-Wshadow] DigitalSet::Iterator it, itE;

or

DGtal/examples/tutorial-examples/polyhedralizer.cpp:172:25: warning: typedef ‘SCell’ locally defined but not used [-Wunused-local-typedefs] typedef KSpace::SCell SCell;

dcoeurjo commented 10 years ago

It is ok know I guess...