Project

General

Profile

Bug #42909

'ceph::converting_category' has virtual functions but non-virtual destructor

Added by Willem Jan Withagen 8 months ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

/home/jenkins/workspace/ceph-master/src/common/error_code.h:28:7: warning: 'ceph::converting_category' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
class converting_category : public boost::system::error_category {
^
1 warning generated.

So lets declare a virtual dtor

History

#1 Updated by Willem Jan Withagen 8 months ago

  • Pull request ID set to 31766

#2 Updated by Jan Fajerski 8 months ago

  • Project changed from ceph-volume to devops

#3 Updated by Willem Jan Withagen 8 months ago

  • Project changed from devops to ceph-volume
  • Pull request ID deleted (31766)

The Boost base class for this contains:

protected:

#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)

    ~error_category() = default;

#else

    // We'd like to make the destructor protected, to make code that deletes
    // an error_category* not compile; unfortunately, doing the below makes
    // the destructor user-provided and hence breaks use after main, as the
    // categories may get destroyed before code that uses them

    // ~error_category() {}

#endif

So the warning is correct, and the "problem" is purposely there.
I closed the PR #31766 since that was not correct.

#4 Updated by Jan Fajerski 7 months ago

  • Project changed from ceph-volume to devops

Still not a ceph-volume issue is it?

Also available in: Atom PDF