You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct ExitJob : public Core::IDispatch
{
virtual void Dispatch() { exit(1); }
[CWE-670] V762: It is possible a virtual function was overridden incorrectly. See first argument of function 'Dispatch' in derived class 'ExitJob' and base class 'IDispatchType'.
The warning is raised in https://github.com/rdkcentral/rdkservices/blob/sprint/25Q1/WebKitBrowser/WebKitImplementation.cpp#L2717
virtual void Dispatch() { exit(1); }
This warning suggests a mismatch between the Dispatch() function signature in ExitJob and the virtual function it is intended to override.
From Thunder Interface code(https://github.com/rdkcentral/Thunder/blob/R4/Source/core/IAction.h) I could see struct IDispatch is inherited from IDispatchType template.
Here there are two templates IDispatchType which includes Dispatch virtual function - one with argument and other without any argument.
Seems this issue arises because the Dispatch() method in ExitJob does not use the override keyword, making a chance of mismatch with the virtual function from the base class.
By marking the Dispatch() method in ExitJob as an override of the virtual Dispatch() method in the base class I could see the warning is getting resolved.
So wanted to address this warning with fix.
0 commit comments