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

Compilation warning warning: delete called on non-final 'LightGBM::ScoreUpdater' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] #5400

Closed
StrikerRUS opened this issue Aug 2, 2022 · 1 comment · Fixed by #5403

Comments

@StrikerRUS
Copy link
Collaborator

[ 10%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt_model_text.cpp.o
In file included from /__w/1/s/src/boosting/gbdt.cpp:5:
In file included from /__w/1/s/src/boosting/gbdt.h:8:
In file included from /__w/1/s/include/LightGBM/boosting.h:8:
In file included from /__w/1/s/include/LightGBM/config.h:15:
In file included from /__w/1/s/include/LightGBM/meta.h:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on non-final 'LightGBM::ScoreUpdater' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<LightGBM::ScoreUpdater>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/__w/1/s/src/boosting/gbdt.cpp:25:7: note: in instantiation of member function 'std::unique_ptr<LightGBM::ScoreUpdater, std::default_delete<LightGBM::ScoreUpdater> >::~unique_ptr' requested here
GBDT::GBDT()
      ^
[ 12%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt_prediction.cpp.o

I guess these warning and notes were introduced in #5279.

@shiyu1994

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed.
To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues
including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant