Skip to content

Remove compilation warnings

Nicolas Cadart requested to merge fix/RemoveCompilationWarnings into master

Fix small errors or bad practices to remove annoying compilation warnings. They are so numerous that they hide the dangerous warnings that may be important.

  • Use a const char* for the orientation array name in vtkTemporalTransforms
  • signed vs unsigned comparison
  • Remove /* inside comment
  • Remove some unused parameters or variables
  • Reorder members initialization
  • Use std::isfinite instead of deprecated pcl_isfinite
  • Initialize variables before use

Feel free to fix remaining warnings when you meet some files that may be easily fixed without risking modifying current code behavior.

This MR also introduces the CMake/SetCompilationWarnings.cmake module, that defines the correct compiler warnings levels to set depending on OS. This module should be added in each application main CMakeLists.txt as replacement of the add_compile_options(... Wall ...) block.

@nick.laurenson @melanie.carriere @lea.vauchier @jerome.dias

Edited by Nicolas Cadart

Merge request reports

Loading