Click here to Skip to main content
15,886,103 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm fixing some PC Lint Plus Warnings and errors. The codebase has IDL files for COM structs. Hence the auto generated h files have virtual functions for COM class but no virtual destructor. Following is the snippet from auto-generated header from IDL file.

C++
MIDL_INTERFACE("9BY99957-418C-4A53-9C86-DD9834B55882")
ISomeInterface : public IUnknown
{
public:
virtual HRESULT foo() = 0;
}


When running Pc Lint Plus, i get this warning

Quote:
warning 3412:'struct ISomeInterface' has virtual functions but non-virtual destructor


What I have tried:

I'm thinking of suppressing these warnings since there is not much i could do here. But has anyone faced this issue and did anyone found a way to overcome it ?
Posted
Updated 20-Mar-20 19:51pm
v2
Comments
Michael Haephrati 4-Apr-20 17:41pm    
Check this answer https://stackoverflow.com/questions/10024796/c-virtual-functions-but-no-virtual-destructors

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900