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

Some compiler warnings. #36

Closed
fire opened this issue Aug 29, 2023 · 1 comment
Closed

Some compiler warnings. #36

fire opened this issue Aug 29, 2023 · 1 comment

Comments

@fire
Copy link

fire commented Aug 29, 2023

modules/lbfgs/thirdparty/../thirdparty/LBFGSpp/include/LBFGSpp/BKLDLT.h: In member function 'int LBFGSpp::BKLDLT<Scalar>::solve_inplace(LBFGSpp::BKLDLT<Scalar>::GenericVector) const':
Error: modules/lbfgs/thirdparty/../thirdparty/LBFGSpp/include/LBFGSpp/BKLDLT.h:523:20: error: declaration of 'i' shadows a previous local [-Werror=shadow]
  523 |         for (Index i = npermc - 1; i >= 0; i--)
      |                    ^
modules/lbfgs/thirdparty/../thirdparty/LBFGSpp/include/LBFGSpp/BKLDLT.h:507:15: note: shadowed declaration is here
  507 |         Index i = (m_perm[m_n - 1] < 0) ? (m_n - 3) : (m_n - 2);
      |               ^
In file included from modules/lbfgs/thirdparty/../thirdparty/LBFGSpp/include/LBFGSB.h:14,
                 from modules/lbfgs/thirdparty/lbfgsbpp.h:39,
                 from modules/lbfgs/register_types.cpp:33:
modules/lbfgs/thirdparty/../thirdparty/LBFGSpp/include/LBFGSpp/LineSearchMoreThuente.h: In static member function 'static int LBFGSpp::LineSearchMoreThuente<Scalar>::LineSearch(Foo&, const SolverParam&, const Vector&, const Vector&, const Scalar&, Scalar&, Scalar&, LBFGSpp::LineSearchMoreThuente<Scalar>::Vector&, Scalar&, LBFGSpp::LineSearchMoreThuente<Scalar>::Vector&)':
Error: modules/lbfgs/thirdparty/../thirdparty/LBFGSpp/include/LBFGSpp/LineSearchMoreThuente.h:415:30: error: declaration of 'ft' shadows a previous local [-Werror=shadow]
  415 |                 const Scalar ft = fx - fx_init - step * test_decr;
      |                              ^~
modules/lbfgs/thirdparty/../thirdparty/LBFGSpp/include/LBFGSpp/LineSearchMoreThuente.h:284:26: note: shadowed declaration is here
  284 |             const Scalar ft = fx - fx_init - step * test_decr;
      |                          ^~
@yixuan
Copy link
Owner

yixuan commented Sep 6, 2023

Thanks for reporting. It has been fixed in 00053e0.

@yixuan yixuan closed this as completed Sep 6, 2023
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