Project

General

Profile

Actions

Bug #42909

open

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

Added by Willem Jan Withagen over 4 years ago. Updated over 4 years 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 (v1):
Crash signature (v2):

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

Actions #1

Updated by Willem Jan Withagen over 4 years ago

  • Pull request ID set to 31766
Actions #2

Updated by Jan Fajerski over 4 years ago

  • Project changed from ceph-volume to devops
Actions #3

Updated by Willem Jan Withagen over 4 years 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.

Actions #4

Updated by Jan Fajerski over 4 years ago

  • Project changed from ceph-volume to devops

Still not a ceph-volume issue is it?

Actions

Also available in: Atom PDF