Part Number: TMS320F28386D
Other Parts Discussed in Thread: C2000WARE
Dear support team,
In an attempt to make my build free of compiler warnings, I have one warning left in the driverlib_cm, regarding variable 'newPktPtr' being set but not referenced.
Environment
- CCS 21.0.0.14__1.12.0
- C2000Ware 26.01.00.00
- Compiler ti-cgt-arm_20.2.7.LTS
- Device F2838x
Issue
- File:
driverlib/f2838x/driverlib_cm/ethernet.cline 2813 - Warning: #552-D: variable "newPktPtr" was set but never used
- Function:
Ethernet_retrieveRxPacket(..,..)
Analysis
Under certain conditions the Rx packet that is returned by the function is first handed to the application via a callback function. The "newPktPtr" is the returned result of that callback function, but after the assignment without further use.
The Ethernet_retrieveRxPacket function always returns the "pktPtr" with the packet popped from the queue.
Depending on the intention / requirements of this API, either:
- the "newPktPtr" should be returned (then this issue is a bug);
- or the returned "newPktPtr" is indeed of no use (and the warning can be suppressed by replacing "newPktPtr" with a cast to void or similar).
Since I am not familiar with the details of this API, I leave further analysis to you. Obviously, there is no rush on my side regarding this issue.
Regards,
Ernst