-
Notifications
You must be signed in to change notification settings - Fork 4k
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
THRIFT-5678: lib: cpp: TConnectedClient: warning due to non-virtual dtor #2747
base: master
Are you sure you want to change the base?
Conversation
Not sure what the status is here? |
I opted to only insert the virtual keyword for destructors in this PR for now. I know that @emmenlau also wanted to remove inline implementations that assign |
Commit 042580f removed the `virtual` keyword from the declaration of `~TConnectedClient()`. While mostly benign, it does cause a warning in some versions of GCC, which can throw off CI sometimes when building with `-Werror`. Signed-off-by: Chris Friedt <[email protected]>
cd4a4cb
to
ffe67a4
Compare
Any idea how to continue with this? I would rather not decide about this one alone. |
My 2c:
If this update is made at least the PR will touch a bit fewer files since this change is bigger than it should be Also refer to this core guideline: C.128: Virtual functions should specify exactly one of virtual, override, or final |
Looking at 042580f yes
I think one would need to check specifically which classes gives this warning, since I expect it would not be TConnectedClient (since it is correct, virtual destructor) Looking through this PR, I see there are actually a few classes that does not have virtual destructors, like TConcurrentClientSyncInfo.h. The question would probably be if they are base classes anywhere. Thus a change like this can be valuable. @cfriedt I would suggest revert any change that adds virtual to a destructor already marked as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest revert any change that adds virtual
to a destructor already marked as override
and then see where that leaves the PR.
Sure - thanks for the feedback. There is one other change that I would need to do to upgrade the Thrift version used in Zephyr after this. That is, namely, to redo the change where I added an alternative to some boost function (it's been so long I'm having a hard time remembering which). Additionally, we are one SDK release away from supporting And after that, I was thinking it would be interesting to try and coalesce |
Commit 042580f removed the
virtual
keyword from the declaration of~TConnectedClient()
.While mostly benign, it does cause a warning in some versions of GCC (non-virtual destructors can result in undefined behaviour), which can throw off CI sometimes when building with
-Werror
.[skip ci]
anywhere in the commit message to free up build resources.