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 various compiler warnings #70

Merged
merged 1 commit into from
Jul 5, 2024
Merged

Conversation

pieterhijma
Copy link
Contributor

This PR fixes a range of compiler warnings.

OndselSolver is compiled within FreeCAD with the following settings:

cmake \
      -DCMAKE_C_COMPILER=clang \
      -DCMAKE_CXX_COMPILER=clang++ \
      -DCMAKE_CXX_FLAGS="-Werror=absolute-value -Werror=reorder-ctor -Werror=sign-compare -Werror=overloaded-virtual -Werror=c++11-compat-deprecated-writable-strings -Werror=uninitialized -Werror=unused-parameter -Werror=unused-variable -Werror=nonnull -Werror=overlength-strings -Werror=strncat-size -Werror=strncat-size -Wno-deprecated-declarations" \
     etc.

@pieterhijma
Copy link
Contributor Author

I would recommend to use the above settings in the CI. @sliptonic, agreed?

If so, @adrianinsaval, could you update the CI?
@aiksiongkoh, I recommend to use the above settings in your IDE as well.

@pieterhijma
Copy link
Contributor Author

@chennes, please note that I used even stricter warnings (as errors) than you did, and FreeCAD currently compiles on main with these flags.

@pieterhijma
Copy link
Contributor Author

I now notice that there is another PR with the same name. This is a coincidence and feel free to rename the PR.

@pieterhijma pieterhijma requested a review from aiksiongkoh July 2, 2024 13:15
Copy link
Contributor

@PaddleStroke PaddleStroke left a comment

Choose a reason for hiding this comment

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

The rest looks fine

#include "EndFramec.h"

using namespace MbD;

ConstraintIJ::ConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj) : frmI(frmi), frmJ(frmj), Constraint()
ConstraintIJ::ConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj) : frmI(std::move(frmi)), frmJ(std::move(frmj))
Copy link
Contributor

Choose a reason for hiding this comment

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

This change I do not know if it can break something.

@PaddleStroke
Copy link
Contributor

I will merge it and test it to make sure it is OK. If it is OK then I'll PR to upstream.

@PaddleStroke PaddleStroke merged commit 64e546f into main Jul 5, 2024
9 checks passed
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.

2 participants