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
Description: Called C++ object pointer is null
File: AbstractOMNeTARAClient.cpp
Lines: 100, 200, and 206
omnetpp/AbstractOMNeTARAClient.cpp:100:26: warning: Called C++ object pointer is null
int nrOfInterfaces = interfaceTable->getNumInterfaces();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
omnetpp/AbstractOMNeTARAClient.cpp:200:37: warning: Called C++ object pointer is null
cPacket* encapsulatedData = simPacket->decapsulate();
^~~~~~~~~~~~~~~~~~~~~~~~
omnetpp/AbstractOMNeTARAClient.cpp:206:9: warning: Called C++ object pointer is null
encapsulatedData->setControlInfo(controlInfo);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
The text was updated successfully, but these errors were encountered:
The issue in line 200 and 206 refer to a (maybe) failing dynamic_cast. Hence, added a check. The same goes for the issue in line 100. The interfaceTable might not be initialized. However, the assert should avoid that subsequent calls are made. For the sake of clarity and for the static analyzer, I've added a check on the pointer.
A bug reported by the clang static analyzer.
Description: Called C++ object pointer is null
File: AbstractOMNeTARAClient.cpp
Lines: 100, 200, and 206
The text was updated successfully, but these errors were encountered: