Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings corrections #1384

Merged
merged 12 commits into from
Feb 20, 2019
Merged

Warnings corrections #1384

merged 12 commits into from
Feb 20, 2019

Conversation

BorisMansencal
Copy link
Contributor

@BorisMansencal BorisMansencal commented Jan 17, 2019

PR Description

This PR correct some warnings when compiled in Debug mode, with gcc 8.2.1:

  • Catch exceptions by reference [-Wcatch-value, enabled by -Wall]
  • Remove const qualifiers on return types [-Wignored-qualifiers, enabled by -Wextra]
  • Remove useless typedefs [-Wunused-local-typedefs]
  • Correct shadowed typedef [-Wshadow]

Combined with all corrections of PR #1379 no more warnings are produced when compiling in Debug mode (with gcc 8.2.1 or clang 7) with ITK enabled.

For the "correct shadowed typedefs" commits, you should thoroughly check that my changes are correct. I have documented in the commit messages which typedef is shadowed.

Checklist

  • Unit-test of your feature with Catch.
  • Doxygen documentation of the code completed (classes, methods, types, members...)
  • Documentation module page added or updated.
  • New entry in the ChangeLog.md added.
  • No warning raised in Debug cmake mode (otherwise, Travis C.I. will fail).
  • All continuous integration tests pass (Travis & appveyor)

Remove typedef from .ih file already present in .h file.
In Debug mode, gcc 8.2.1, warns that this declaration shadows a previous typedef [-Wshadow]
In Debug, gcc 8.2.1 warns about exceptions not caught by reference [-Wcatch-value, enabled by -Wall].
In Debug, gcc 8.2.1, warns on useless const qualifiers on cast result types [-Wignored-qualifiers, enabled by -Wextra].
In Debug mode, -Wshadow of gcc 8.2.1 warns that Scalar typedef shadows previous typedef in src/DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.h:161
In Debug mode, -Wshadow of gcc 8.2.1 warns that Scalar typedef shadows previous typedef in src/DGtal/geometry/surfaces/estimation/IntegralInvariantVolumeEstimator.h:159
In Debug mode, -Wshadow of gcc 8.2.1 warns that NormalFunctor typedef shadows previous typedef in src/DGtal/helpers/ShortcutsGeometry.h:156
In Debug mode, -Wshadow of gcc 8.2.1 warns that RealPoint typedef shadows previous typedef in src/DGtal/shapes/parametric/StarShaped3D.h:76
In Debug mode, -Wshadow of gcc 8.2.1 warns that Point typedef shadows previous typedef at tests/topology/testVoxelComplex.cpp:452
@dcoeurjo dcoeurjo changed the title Warnings corrections [WIP] Warnings corrections Jan 19, 2019
@dcoeurjo dcoeurjo added the Build label Jan 26, 2019
@dcoeurjo dcoeurjo added this to the 1.0 milestone Jan 26, 2019
@dcoeurjo
Copy link
Member

Hi @BorisMansencal
Can this PR be reviewed ?

@BorisMansencal
Copy link
Contributor Author

@dcoeurjo it seems ok.

@dcoeurjo dcoeurjo changed the title [WIP] Warnings corrections Warnings corrections Feb 20, 2019
@dcoeurjo
Copy link
Member

thanks @BorisMansencal , I'm on it

@dcoeurjo dcoeurjo self-requested a review February 20, 2019 12:27
Copy link
Member

@dcoeurjo dcoeurjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks for the PR. Merging

@dcoeurjo dcoeurjo merged commit bf819bc into DGtal-team:master Feb 20, 2019
@BorisMansencal BorisMansencal deleted the gcc8w branch February 21, 2019 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants