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 simple warnings #125

Merged
merged 2 commits into from
Aug 23, 2022
Merged

Conversation

k2shah
Copy link
Contributor

@k2shah k2shah commented Aug 8, 2022

This MR fixes some warnings thrown by c++17 using -Wall

In file included from /src/Solver.cpp:11:0:
osqp_eigen/OsqpEigen/Solver.hpp: In constructor 'OsqpEigen::Solver::Solver()':
osqp_eigen/OsqpEigen/Solver.hpp:53:14: warning: 'OsqpEigen::Solver::m_isSolverInitialized' will be initialized after [-Wreorder]
         bool m_isSolverInitialized; /**< Boolean true if solver is initialized. */
              ^~~~~~~~~~~~~~~~~~~~~
In file included from /src/Solver.cpp:11:0:
osqp_eigen/OsqpEigen/Solver.hpp:34:78: warning:   'std::unique_ptr<OSQPWorkspace, std::function<void(OSQPWorkspace*)> > OsqpEigen::Solver::m_workspace' [-Wreorder]
         std::unique_ptr<OSQPWorkspace, std::function<void(OSQPWorkspace *)>> m_workspace;  /**< Pointer to OSQPWorkspace struct. */
                                                                              ^~~~~~~~~~~
/src/Solver.cpp:20:1: warning:   when initialized here [-Wreorder]
 OsqpEigen::Solver::Solver()
 ^~~~~~~~~
INFO: From Compiling src/Data.cpp:
/src/Data.cpp: In member function 'bool OsqpEigen::Data::isSet() const':
/src/Data.cpp:92:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
         m_isLinearConstraintsMatrixSet &&
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         m_isLowerBoundSet &&
         ~~~~~~~~~~~~~~~~~~^~
         m_isUpperBoundSet;
         ~~~~~~~~~~~~~~~~~  
         ```

@k2shah
Copy link
Contributor Author

k2shah commented Aug 11, 2022

hi @GiulioRomualdi
Please let me know if this PR is acceptable and who might be able to review it. It''s a small PR aimed at fixing warnings.

@GiulioRomualdi
Copy link
Member

Thank you @k2shah for the contribution

@GiulioRomualdi GiulioRomualdi merged commit 3a15343 into robotology:master Aug 23, 2022
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