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

Fix compile warnings #76

Merged
merged 13 commits into from Jun 7, 2021
Merged

Fix compile warnings #76

merged 13 commits into from Jun 7, 2021

Conversation

jayghoshter
Copy link
Contributor

@jayghoshter jayghoshter commented May 14, 2021

Fixes #63

We had 3 sets of warnings:

  • Inline functions readReferenceConcentrations() declarations
  • TBB deprecation warnings: tbb.h and some other headers are deprecated
  • A bunch of one-definition rule violations in tests.

The first two are fixed. The last one is harder and I'll need help.

@jayghoshter jayghoshter self-assigned this May 14, 2021
@jayghoshter
Copy link
Contributor Author

ODR warnings removed in latest commit thanks to @sleweke / @sleweke-bayer , whichever account applies 😉.

For posterity, the ODR warnings were triggered due to forward declarations of nlohmann::json to avoid including the MASSIVE json.hpp header.

Removes const qualifiers on returned values, which are without effect.
Fixes warnings encountered when compiling with -Wall -pedantic-errors
-Wextra -Wno-unused-parameter -Wno-unused-function. Adds these flags to
the standard compile options.
@sleweke
Copy link
Member

sleweke commented May 16, 2021

I've enabled some more warnings by passing

-Wall -pedantic-errors -Wextra -Wno-unused-parameter -Wno-unused-function

to the compiler. These options are enabled from now on to ensuree code quality.
Please do some tests to make sure that everything still works.

sleweke and others added 7 commits May 17, 2021 07:59
Uses std::size_t as loop variable type for iterating std::vector instead
of unsigned int.
cadet_assert is only defined in DEBUG mode, leading to unused ptr2
variable. Fixed by only assigning and asserting ptr2 in DEBUG mode.
Since we're comparing with int type.
Sets C++17 as required C++ standard in the CMake script. Also updates
the build instructions with the minimum compiler versions.
@sleweke sleweke merged commit 6289c31 into master Jun 7, 2021
@sleweke sleweke deleted the fixCompileWarnings branch June 7, 2021 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix compile warnings
3 participants