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

[BUG] PersistentStorageOpCertStore: Virtual call in destructor #29239

Closed
rojer opened this issue Sep 14, 2023 · 0 comments · Fixed by #29286
Closed

[BUG] PersistentStorageOpCertStore: Virtual call in destructor #29239

rojer opened this issue Sep 14, 2023 · 0 comments · Fixed by #29286
Labels
bug Something isn't working needs triage

Comments

@rojer
Copy link
Contributor

rojer commented Sep 14, 2023

Reproduction steps

PersistentStorageOpCertStore's dtor invokes PersistentStorageOpCertStore::Finish(), which invokes PersistentStorageOpCertStore::RevertPendingOpCerts() which is a virtual method. This annoys clang-tidy (and rightly so).

I think we're fine here - this class has no subclasses and can be declared final to pacify the analyzer.

Bug prevalence

Always

GitHub hash of the SDK that was being used

ba85422

Platform

core

Platform Version(s)

No response

Anything else?

No response

@rojer rojer added bug Something isn't working needs triage labels Sep 14, 2023
rojer added a commit to rojer/connectedhomeip that referenced this issue Sep 15, 2023
In this case methods invoked belong to this class so as long as there are no descendants, it's ok.

Fixes project-chip#29239
rojer added a commit to rojer/connectedhomeip that referenced this issue Sep 15, 2023
`PersistentStorageOpCertStore`'s dtor invokes `PersistentStorageOpCertStore::Finish()`, which invokes
`PersistentStorageOpCertStore::RevertPendingOpCerts()` which is a virtual method.

In this case methods invoked belong to this class so as long as there are no descendants, it's ok.
Make sure there are no descendants by declaring the class final.

Fixes project-chip#29239
rojer added a commit to rojer/connectedhomeip that referenced this issue Sep 15, 2023
`~PersistentStorageOpCertStore` invokes `Finish()`, which invokes `RevertPendingOpCerts()` which is a virtual method.

In this case methods invoked belong to this class so as long as there are no descendants, it's ok.
Make sure there are no descendants by declaring the class final.

Fixes project-chip#29239
@mergify mergify bot closed this as completed in #29286 Sep 18, 2023
mergify bot pushed a commit that referenced this issue Sep 18, 2023
`~PersistentStorageOpCertStore` invokes `Finish()`, which invokes `RevertPendingOpCerts()` which is a virtual method.

In this case methods invoked belong to this class so as long as there are no descendants, it's ok.
Make sure there are no descendants by declaring the class final.

Fixes #29239
HunsupJung pushed a commit to HunsupJung/connectedhomeip that referenced this issue Oct 23, 2023
…29286)

`~PersistentStorageOpCertStore` invokes `Finish()`, which invokes `RevertPendingOpCerts()` which is a virtual method.

In this case methods invoked belong to this class so as long as there are no descendants, it's ok.
Make sure there are no descendants by declaring the class final.

Fixes project-chip#29239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant