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

Compillation warnings #69

Closed
yurivict opened this issue Aug 24, 2019 · 1 comment
Closed

Compillation warnings #69

yurivict opened this issue Aug 24, 2019 · 1 comment

Comments

@yurivict
Copy link

clang8 prints these warnings:

In file included from /usr/ports/math/hpipm/work/hpipm-0.1.0/tree_ocp_qp/d_tree_ocp_qp_ipm.c:117:
/usr/ports/math/hpipm/work/hpipm-0.1.0/tree_ocp_qp/x_tree_ocp_qp_ipm.c:1016:118: warning: | has lower precedence than >; > will be evaluated first [-Wparentheses]
                                ( itref_qp_norm[0]==0.0 & BLASFEO_DVECEL(ws->res_itref->res_g+0, 0)!=BLASFEO_DVECEL(ws->res_itref->res_g+0, 0) ) |
                                                                                                                                                 ^
/usr/ports/math/hpipm/work/hpipm-0.1.0/tree_ocp_qp/x_tree_ocp_qp_ipm.c:1016:118: note: place parentheses around the '>' expression to silence this warning
                                ( itref_qp_norm[0]==0.0 & BLASFEO_DVECEL(ws->res_itref->res_g+0, 0)!=BLASFEO_DVECEL(ws->res_itref->res_g+0, 0) ) |
                                                                                                                                                 ^
/usr/ports/math/hpipm/work/hpipm-0.1.0/tree_ocp_qp/x_tree_ocp_qp_ipm.c:1016:118: note: place parentheses around the | expression to evaluate it first
                                ( itref_qp_norm[0]==0.0 & BLASFEO_DVECEL(ws->res_itref->res_g+0, 0)!=BLASFEO_DVECEL(ws->res_itref->res_g+0, 0) ) |
                                                                                                                                                 ^
                                (
1 warning generated.
In file included from /usr/ports/math/hpipm/work/hpipm-0.1.0/tree_ocp_qp/d_tree_ocp_qp_kkt.c:112:
/usr/ports/math/hpipm/work/hpipm-0.1.0/tree_ocp_qp/x_tree_ocp_qp_kkt.c:1020:26: warning: equality comparison result unused [-Wunused-comparison]
                        ws->use_hess_fact[idx]==1;
                        ~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/ports/math/hpipm/work/hpipm-0.1.0/tree_ocp_qp/x_tree_ocp_qp_kkt.c:1020:26: note: use '=' to turn this equality comparison into an assignment
                        ws->use_hess_fact[idx]==1;
                                              ^~
                                              =
1 warning generated.
In file included from /usr/ports/math/hpipm/work/hpipm-0.1.0/ocp_qp/s_ocp_qp_kkt.c:126:
/usr/ports/math/hpipm/work/hpipm-0.1.0/ocp_qp/x_ocp_qp_kkt.c:1417:24: warning: equality comparison result unused [-Wunused-comparison]
                ws->use_hess_fact[ss]==1;
                ~~~~~~~~~~~~~~~~~~~~~^~~
/usr/ports/math/hpipm/work/hpipm-0.1.0/ocp_qp/x_ocp_qp_kkt.c:1417:24: note: use '=' to turn this equality comparison into an assignment
                ws->use_hess_fact[ss]==1;
                                     ^~
                                     =
/usr/ports/math/hpipm/work/hpipm-0.1.0/ocp_qp/x_ocp_qp_kkt.c:1488:25: warning: equality comparison result unused [-Wunused-comparison]
                        ws->use_hess_fact[ss]==1;
                        ~~~~~~~~~~~~~~~~~~~~~^~~
/usr/ports/math/hpipm/work/hpipm-0.1.0/ocp_qp/x_ocp_qp_kkt.c:1488:25: note: use '=' to turn this equality comparison into an assignment
                        ws->use_hess_fact[ss]==1;
                                             ^~
                                             =
/usr/ports/math/hpipm/work/hpipm-0.1.0/ocp_qp/x_ocp_qp_kkt.c:1559:24: warning: equality comparison result unused [-Wunused-comparison]
                ws->use_hess_fact[ss]==1;
                ~~~~~~~~~~~~~~~~~~~~~^~~
/usr/ports/math/hpipm/work/hpipm-0.1.0/ocp_qp/x_ocp_qp_kkt.c:1559:24: note: use '=' to turn this equality comparison into an assignment
                ws->use_hess_fact[ss]==1;
                                     ^~
                                     =
3 warnings generated.
@giaf
Copy link
Owner

giaf commented Aug 26, 2019

The last warnings are now fixed in master branch.

@giaf giaf closed this as completed Aug 26, 2019
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

No branches or pull requests

2 participants